The following commands should help you get started with Kubernetes and kubectl.
Get information about your cluster
List the resources available in your cluster. More details
kubectl get nodes
kubectl get deployments
kubectl get pods
kubectl get all
Run a container
It’s like docker run
with a little bit different syntax. More details
kubectl run <name> --image=<image> --port=8080
Get logs from a container
This will output the logs from the container into your terminal. More details
kubectl logs <pod_name>
Execute command in container
This executes the env
command in the container and displays the result. More details
kubectl exec <pod_name> env