Basic KUBECTL Commands

Basic KUBECTL Commands

The following KubeCTL commands are the most common ones that a client may use

 

Get list of pods

1. Kubectl get pods


 

Get status of each pod

1. Kubectl describe pod {pod name}  


 

Get logs for a pod

To look into the actual pod e.g. deployment which is the most important (start here for any troubleshooting on installation)

1. Kubectl logs {insert pod name} -[pod component}  


 

Show ingress

Used to see what ingress points are configured, hostname configures and ip addresses assigned

1. Kubectl get ingress  


 

To remove a pod

This is used to delete a pod so that it can be recreated

1. kubectl delete pod {Insert pod name}


 

To scale a pod

This command can be used to instruct Kubernetes to scale a specific pod if auto scaling is not enabled.

1. kubectl scale deploy {insert pod name} --replicas=2  


 


Was this article helpful?
Copyright (C) 2001-2024, Ai Software, LLC d/b/a LumenVox