Kubernetes Cheat Sheet

PHOTO EMBED

Fri Mar 19 2021 15:30:42 GMT+0000 (Coordinated Universal Time)

Saved by @bmillot #k8s

# Display the list of context
kubectl config get-contexts   
# Display the current-context
kubectl config current-context
# Change context to my-cluster-name
kubectl config use-context my-cluster-name
# Get nodes
kubectl get nodes
# Get pods
kubectl get pods
# Execute bash in a specific pod
kubectl exec -it pod-name -- /bin/bash
# Inspect env values
kubectl exec pod-name -- env
content_copyCOPY

https://kubernetes.io/fr/docs/reference/kubectl/cheatsheet/