tldr ckad exam

# Set and use context
kubectl config set-context <context> --namespace=<namespace>
kubectl config use-context <context>
 
# Generate yaml for resources
k run|create ... -o yaml --dry-run=client
 
# namespace
k create namespace <namespace>
k config set-context --current --namespace <namespace> 
k delete namespace <namespace> # will remove all objects inside
 
# Inspect objects
k get pod nginx --namespace=ckad -o wide
k describe pod nginx --namespace=ckad | grep -i ip
 
# Start a temporary pod
k run tempbox --image=... --restart=Never --rm -it -- wget -O- <ip>
 
# Run commands instead a container
k exec -it box -- /bin/sh
 
# Quickly halt and delete a pod
k delete pod --now