Compare node allocatable vs capacity kubectl
Show reserved overhead per node; gap = kube/system reservations
kubectl get nodes -o json | jq -r '.items[] | {node:.metadata.name, capCPU:.status.capacity.cpu, allocCPU:.status.allocatable.cpu, capMem:.status.capacity.memory, allocMem:.status.allocatable.memory}'
more kubectl
all 73 commands →
ConfigMap from env-file with patch op
kubectl create configmap <name> --from-env-file=app.env -n <ns> --dry-run=client -o yaml | kubectl apply -f -; kubectl patch deploy/<name> -n <ns> --type=json -p='[{"op":"add","path":"/spec/template/spec/containers/0/envFrom/-","value":{"configMapRef":{"name":"<name>"}}}]'
List all pods across namespaces
kubectl get pods -A -o wide
Describe a pod
kubectl describe pod <name> -n <ns>
Follow pod logs
kubectl logs -f <pod> -n <ns>
Logs from previous container
kubectl logs <pod> --previous -n <ns>