Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 620 Bytes

k8s.md

File metadata and controls

30 lines (20 loc) · 620 Bytes

Kubernetes etc.

Various k8s commands.

Shell into a specific container in a pod:

kubectl exec -i -t <POD> --container <CONTAINER> -- /bin/bash

Get logs from a container (easier) with https://github.com/wercker/stern stern <container name>

Redo a deployment:

kubectl get deployment <NAME> -n default -o yaml | kubectl replace --force -f -

Redo a pod:

kubectl get pod <NAME> -n default -o yaml | kubectl replace --force -f -

Switch between configs:

See ~/.kube/config for configs, to switch:

kubectl config use-context <NAME>