Add k8s commands
This commit is contained in:
parent
d558932768
commit
26c4bfbe4c
1 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue