Working with Pods
- Lets deploy a pod using:
kubectl run nginx
This command will only deploy a Pod on your kubernetes worker node without any container inside it
- Now lets deploy a pod with a Nginx container
kubectl run nginx --image nginx
This command will only deploy a Pod on your kubernetes worker node with nginx container inside it
- Get running pod list using
kubectl get pod
- Get running pod details using:
kubectl describe pod <pod-name>
- Delete pod using
kubectl delete pod <pod-name>
- Now lets try to deploy pod with its container using YAML file, please refer this link
Deploy using following commandkubectl create -f pod-definition.yml