Skip to content

Instantly share code, notes, and snippets.

@jonashackt
Last active March 13, 2024 13:36
Show Gist options
  • Select an option

  • Save jonashackt/df283eb3f5ed587ee1f93cbcfc23be08 to your computer and use it in GitHub Desktop.

Select an option

Save jonashackt/df283eb3f5ed587ee1f93cbcfc23be08 to your computer and use it in GitHub Desktop.
Kubernetes cheat sheet
#see https://kubernetes.io/docs/reference/kubectl/cheatsheet/
# Retrieve cluster info
kubectl cluster-info dump
# every component with namespace kube-system
kubectl get all --namespace kube-system
# Flannel logging
kubectl logs -n kube-system kube-flannel-ds-cw7kf -c kube-flannel
kubectl get pod kube-flannel-ds-cw7kf --namespace kube-system -o yaml
# Kube-DNS
kubectl describe pods -l k8s-app=kube-dns -n kube-system
kubectl get nodes --output=jsonpath='{range .items[*]}{.status.addresses[?(@.type=="InternalIP")].address} {.spec.podCIDR} {"\n"}{end}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment