Skip to content
On this page

Useful Commands

Below follows a set of commands that are commonly used when working with Mappia installations.

Kubectl General Commands

Here is a series of commands that are useful to manage your cluster. Be sure to check Kubectl's cheat sheet for more commands

CommandDescription
kubectl config get-contextsList all contexts you have configured
kubectl config current-contextsDisplay the name of the current context that is being used by kubectl
kubectl config use-context <context-name>Switch between different configured contexts
kubectl get podsList pods running
kubectl get servicesList services running
kubectl get deploymentsList services running
kubectl get nodesList services running
kubectl describe <resource> <resource-name>Describe resource details like usage, state, events and status.
kubectl delete pod <pod-name>Delete a specific pod
kubectl logs -f <pod-name>Stream logs from a pod
kubectl delete pods --field-selector status.phase=FailedDelete all pods that are in an error state

Useful Mappia Commands

These commands are Mappia-specific. They rely on features we've built just for Mappia.

TIP

For many of these commands, if you have changed your chart's release name from mappia to my-project-name, the associated command needs to be changed to match, i.e. deploy/mappia-manager becomes deploy/my-project-name-manager.

CommandDescription
kubectl exec -it deploy/mappia-manager -- shShell into manager pod
kubectl exec -it deploy/mappia -- shShell into magento pod.
kubectl exec deploy/mappia -- php-fpm -tt 2>&1 -i | grep <php_ini_setting>Fetch php ini setting from a FPM pod
kubectl exec deploy/mappia-manager -- php -i | grep <php_ini_setting>Fetch php ini setting from a CLI pod