Can you list more kubectl commands?

Certainly! Here are additional kubectl commands:

  1. Get Deployments:

    kubectl get deployments
  2. Get ReplicaSets:

    kubectl get replicasets
  3. Get Namespaces:

    kubectl get namespaces
  4. Create a Resource from a File:

    kubectl create -f <file.yaml>
  5. Scale a Deployment:

    kubectl scale deployment <deployment-name> --replicas=<number>
  6. Rollout Status of a Deployment:

    kubectl rollout status deployment/<deployment-name>
  7. Rollback a Deployment:

    kubectl rollout undo deployment/<deployment-name>
  8. Drain a Node (for maintenance):

    kubectl drain <node-name>
  9. Uncordon a Node (to make it schedulable again):

    kubectl uncordon <node-name>
  10. Get Events:

    kubectl get events

These commands will help you manage various resources and operations within your Kubernetes cluster effectively.

0 Comments

no data
Be the first to share your comment!