kubectl run --image=xxx name_xx --port
kubectl run --image=nginx nginx-app --port=80
kubectl expose
kubectl expose deployment nginx-app --type="NodePort" --port=80
in default,pods only deploy on node,not on master, please use the node ip to access.
kubectl get
kubectl get deployment
kubectl get pods
kubectl get service
kubectl attach
kubectl attach -it nginx-app-5jyvm
kubectl exec
kubectl exec -it nginx-app-5jyvm -- /bin/bash
kubectl logs
kubectl logs -f nginx-app-zibvs
kubectl delete
kubectl delete deployment xxx
kubectl delete pods xxx
kubectl delete service xxx