Kubernetes

  • MicroK8s is great for running an Ubuntu style Kubernetes platform
  • K3s If you like Rancher style Kubernetes management, K3s is for you. It's intentionally lightweight so it can run in places a full kubernetes installation couldn't.
  • Kind Use docker to run Kubernets. This implementation is useful when you have docker, but you can't install a normal kubernetes implementation

kubectl commands

List the namespaces in K8s

kubectl get ns

Set your current context to a particular namespace

kubectl config set-context --current --namespace=<the_namespace>

List the pods in your current namespace

kubectl get pods

Dump the logs from the last 5 minutes for a pod

kubectl logs pod/<pod_name> --since=5m