diff --git a/src/ops/k8s/kubectl.md b/src/ops/k8s/kubectl.md index 154a7e4..1fad4be 100644 --- a/src/ops/k8s/kubectl.md +++ b/src/ops/k8s/kubectl.md @@ -18,6 +18,24 @@ Even if you see `kubectl apply` everywhere sometimes it's handy to use dedicated For example, `kubectl create` is used to create a ressource and will throw an error if a ressource already exists. +#### Imperative commands quick reference + +Do not forget that `--dry-run=client` can be usefull + +##### Create a simple pod + +```sh +kubectl run nginx --image=nginx +``` + +##### Create a deployement + +```sh +kubectl create deployment --image=nginx nginx +``` + +**Gotcha**, deployement do not have a `--replicas` option, you need to use `kubctl scale` after deployement creation + ### Generating a manifests, blazzing fast way ```sh