Add k8s commands

This commit is contained in:
Wilfried OLLIVIER 2020-11-21 17:53:43 +01:00
parent d558932768
commit 26c4bfbe4c

View file

@ -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. 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 ### Generating a manifests, blazzing fast way
```sh ```sh