Basic KUBECTL Commands

The following kubectl commands are some common ones that may be helpful.

Type kubectl without any parameters, or with the --help parameter, to get a list of other commands, as well as more detailed usage information.

List of pods

Shown here with the optional lumenvox namespace specifier (-n lumenvox). Use a different namespace as needed for your installation.

kubectl get pods -n lumenvox


Details of a pod

kubectl describe pod <pod-name> -n lumenvox

Logs for a pod

To view the logs for a specified pod e.g. deployment which is the most important (start here for any troubleshooting on installation)

kubectl logs <pod-name> -c <container-name> -n lumenvox
  

List ingress

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

kubectl get ingress -n lumenvox
 

Removing a pod

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

kubectl delete pod <pod-name> -n lumenvox
 

Scaling a pod

This command can be used to instruct Kubernetes to scale a specified pod if auto-scaling is not enabled. In this example, to 2 replicas.

kubectl scale deploy <pod-name> --replicas=2 -n lumenvox

 


Was this article helpful?