kubectl get pods # get all pods in the default namespace
kubectl describe pod myapp-pod
kubectl get pods -A
kubectl get pods -n namespace
kubectl get pod <name> -o yaml > /path/name.yaml
kubectl delete pods webapp
prefer to create pods with apply an yaml an update the file directly
kubectl edit pods redis
apiVersion: v1
kind: Pod
metadata:
name: myapp
namespace: default
labels:
app: myapp
type: front-end
spec:
containers:
- name: nginx-container
image: nginx
kubectl create -f /path/Pod-example.yaml