diff --git a/docs/containers/docker.md b/docs/containers/docker.md index 7d8adff..1b5b404 100644 --- a/docs/containers/docker.md +++ b/docs/containers/docker.md @@ -59,7 +59,7 @@ VMs incur a lot of overhead beyond what is being consumed by your application lo --- -### Docker CLI +## Docker CLI ### [`docker run`](https://docs.docker.com/engine/reference/commandline/run/) diff --git a/docs/containers/kubernetes.md b/docs/containers/kubernetes.md index 8d6340d..6049569 100644 --- a/docs/containers/kubernetes.md +++ b/docs/containers/kubernetes.md @@ -1 +1,25 @@ # Kubernetes + +## `kubectl` + +### `kubectl get` + +```sh +kubectl config get-contexts # list available contexts + +kubectl get namespaces # list namespaces inside current context + +kubectl get pod -n|--namespace # list pods inside namespace +kubectl get pod [-n|--namespace ] -o|--output jsonpath='{.spec.containers[*].name}' # list containers inside pod +``` + +### `kubectl exec` + +```sh +kubectl exec [-i|--stdin] [-t|--tty] [-n|--namespace ] [-c|--container ] -- # execute a command inside a container +``` +### `kubectl logs` + +```sh +kubectl logs [-f|--follow] [-n|--namespace ] [-c|--container] # get pod/container logs +``` \ No newline at end of file