Advance | Top 10 Kubernetes commands

Ink Insight 🧘🏼
DevOps Dudes
Published in
2 min readFeb 6, 2023

Let’s keep the Kubernetes journey rolling! Check out this continuation of the blog for those must-know fundamental commands. And don’t forget to bring your sense of humor along for the ride! :) 🚀

Here are 10 advanced Kubernetes commands:

  1. kubectl cp— Copy files and directories to and from containers.
    Example: kubectl cp <pod-name>:<container-path> <host-path>
  2. kubectl auth— Manage authentication and authorization in a cluster.
    Example: kubectl auth reconcile
  3. kubectl config— Modify the configuration of the Kubernetes CLI.
    Example: kubectl config use-context <context-name>
  4. kubectl taint— Taint a node, causing pods to be rescheduled to other nodes.
    Example: kubectl taint nodes <node-name> key=value:NoSchedule
  5. kubectl label— Add, modify, or remove labels on a resource.
    Example: kubectl label pods <pod-name> app=nginx
  6. kubectl top— Display resource usage for nodes or pods.
    Example: kubectl top node
  7. kubectl patch— Apply a patch to a resource.
    Example: kubectl patch deployment <deployment-name> -p ‘{“spec”: {“replicas”: 3}}’
  8. kubectl run— Create a new deployment using a single command.
    Example: kubectl run nginx — image=nginx — restart=Never — generator=run/v1
  9. kubectl api-resources— List the available resources in the cluster.
    Example: kubectl api-resources — namespaced=false
  10. kubectl explain— Get detailed information about a specific resource field.
    Example: kubectl explain pod.spec.containers

Thanks for reading! I appreciate your support 👏 and engagement 🚙 in my stories. I’m always looking for ways to improve, so please feel free to leave a comment or share your thoughts.

--

--

Ink Insight 🧘🏼
DevOps Dudes

Discover the intersection of DevOps, InfoSec, and mindfulness with Ink Insight. Follow for valuable insights! ✍︎ 👨‍💻 🧘🏼