Basic KUBECTL Commands
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.
Note that for many of these commands you typically need to provide the namespace you wish to use, which may be the lumenvox namespace, or some other namespace your installation uses. If you wish to specify the lumenvox namespace, use the following syntax: kubectl <command> -n lumenvox
Get 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
Get details of each pod
kubectl describe pod <pod-name> -n lumenvox
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)
kubectl logs <pod-name> -c <container-name> -n lumenvox
Show ingress
Used to see what ingress points are configured, hostname configures and ip addresses assigned
kubectl get ingress -n lumenvox
To remove a pod
This is used to delete a pod so that it can be recreated
kubectl delete pod <pod-name> -n lumenvox
To scale a pod
This command can be used to instruct Kubernetes to scale a specific pod if auto scaling is not enabled. In this example, to 2 replicas.
kubectl scale deploy <pod-name> --replicas=2 -n lumenvox