Working with Pods

0 104
  1. 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

  2. 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

  3. Get running pod list using
    kubectl get pod
  4. Get running pod details using:
    kubectl describe pod <pod-name>
  5. Delete pod using
    kubectl delete pod <pod-name>
  6. Now lets try to deploy pod with its container using YAML file, please refer this link
    Deploy using following command

    kubectl create -f pod-definition.yml

Leave A Reply

Your email address will not be published.