Raw notes from Ray’s @saturnism session. Ray is always in motion.
Surprised that he spent some minutes of his valuable time on the old “oasis in the desert” story. Don’t get me wrong, it’s a great story, and he tells it very well, but these sessions are only 45 minutes long. He only spent 3 minutes on it, so I guess it’s fine.
- Don’t start with necessarily start with Kubernetes. Follow best practices. Start with the Twelve-Factore App!
Runtime environment is your responsibility now.
You’ll need a dedicated team for container hygiene.
Choose a JDK
OpenJDK 8u192 or above
MaxHeapproblem: if you don’t specify, it will take the entire available memory, causing Docker to kill you, to illustrate the non-container aware JDK problem.
Two types of memory usage in Java: Heap, Native Memory Usage
Docker Tips and Tricks
Just Jib It
Jib is a maven plugin, that creates a Docker container .
This jib thing looks really awesome. It has full configuration and much easier than any docker maven thing I’ve seen.
k3s, k3d, kind, minikube
k3s is good for linux environments.
But it looks like the Docker for Mac built-in Kubernetes.
Keep Base Deployment Simple
The hardest part is to write the yaml file.
k create deployment -oyaml --dry-run k create svc -oyaml --dry-run
Still need to configure
resourcesdictionary. requests, limits, memory, etc.
Still need to configure liveness (are you alive) and readiness (are you ready to accept traffic) probes.
preStop, httpGet, exec tcpSocket
Put the healthchecks on a separate port, so you can put a network security group around it.
Some skaffold thing
- Supports debugging. Very nice.