Kubernetes Key Commands Map

This article provides a concise overview of essential Kubernetes commands for managing clusters, deployments, and services. Below is a list of key commands and practical examples to help you get started with Kubernetes.

You Should Know:

1. Cluster Management:

  • Check cluster info:
    kubectl cluster-info
    
  • Get nodes in the cluster:
    kubectl get nodes
    

2. Deployment Management:

  • Create a deployment:
    kubectl create deployment nginx --image=nginx
    
  • List deployments:
    kubectl get deployments
    

3. Pod Management:

  • List pods:
    kubectl get pods
    
  • Describe a pod:
    kubectl describe pod <pod-name>
    

4. Service Management:

  • Expose a deployment as a service:
    kubectl expose deployment nginx --port=80 --type=LoadBalancer
    
  • List services:
    kubectl get services
    

5. Scaling:

  • Scale a deployment:
    kubectl scale deployment nginx --replicas=3
    

6. Logs and Debugging:

  • View pod logs:
    kubectl logs <pod-name>
    
  • Execute a command in a pod:
    kubectl exec -it <pod-name> -- /bin/bash
    

7. ConfigMaps and Secrets:

  • Create a ConfigMap:
    kubectl create configmap my-config --from-literal=key1=value1
    
  • Create a Secret:
    kubectl create secret generic my-secret --from-literal=password=my-password
    

8. Resource Deletion:

  • Delete a pod:
    kubectl delete pod <pod-name>
    
  • Delete a deployment:
    kubectl delete deployment nginx
    

What Undercode Say:

Kubernetes is a powerful tool for managing containerized applications, and mastering its commands is essential for efficient cluster management. The commands listed above cover the basics of deployment, scaling, and debugging. For further learning, consider exploring the official Kubernetes documentation: Kubernetes Docs. Practice these commands in a local or cloud-based Kubernetes environment to solidify your understanding. Happy Kuberneting!

References:

Reported By: Techops Examples – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top