Kubernetes

  • Often called k8s (there are 8 letters between the k and the s)
  • There are lots of problems with running on M1 Macs (even with Docker Desktop supplied Kubernetes), don’t use it 2022-02-23
  • microk8s seems to be a good choice as a k8s platform
  • k9s is a nice (command line) tool for monitoring k8s

Monitoring

kursiv

Blogpost on PLG Stack with helm #loki #grafana

Extract Config

kubectl config view --minify --raw

Output

kubectl -n plg get secret plg-grafana -o jsonpath=‘{.data.admin-password}’ | base64 -d; echo

Commands

Get a specific pod matching a label (app: replay-service) and copy a file into it:

POD=$(kubectl get pod -n replay -l app=replay-service -o jsonpath="{.items[0].metadata.name}")
kubectl cp -n replay 00000.parquet $POD:/app

Resources

Resoures can be set for CPU and Memory.

A limit is the maximum that a container can request, request is the default/minimum that a container requests and gets assigned. The sum of all requests is the minimum amount of cpu/memory the cluster should have.

Do not set CPU limits

  • Always use memory limits
  • Always use memory requests
  • Always set your memory requests equal to your limits kubernetes memory limits

Questions:

What is the best way to expose a SeHow does a service work with a multi node Service? What IP does the (internal) DNS resolve to? rvice? Do Loadbalancers only work with Cloud Services? Is there a homegrown version for a nodebalancer? Do we need this? How does a service work with a multi node Service? What IP does the (internal) DNS resolve to? Can I fix the IP of the DNS server?