mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-13 11:59:18 +00:00
Update cheatsheets
This commit is contained in:
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run an nginx pod and expose port 80:
|
||||
|
||||
`kubectl run {{nginx-dev}} --image=nginx --port 80`
|
||||
`kubectl run {{nginx-dev}} --image nginx --port 80`
|
||||
|
||||
- Run an nginx pod, setting the TEST_VAR environment variable:
|
||||
|
||||
`kubectl run {{nginx-dev}} --image=nginx --env="{{TEST_VAR}}={{testing}}"`
|
||||
`kubectl run {{nginx-dev}} --image nginx --env "{{TEST_VAR}}={{testing}}"`
|
||||
|
||||
- Show API calls that would be made to create an nginx container:
|
||||
|
||||
`kubectl run {{nginx-dev}} --image=nginx --dry-run={{none|server|client}}`
|
||||
`kubectl run {{nginx-dev}} --image nginx --dry-run={{none|server|client}}`
|
||||
|
||||
- Run an Ubuntu pod interactively, never restart it, and remove it when it exits:
|
||||
|
||||
`kubectl run {{temp-ubuntu}} --image=ubuntu:22.04 --restart=Never --rm -- /bin/bash`
|
||||
`kubectl run {{temp-ubuntu}} --image ubuntu:22.04 --restart Never --rm -- /bin/bash`
|
||||
|
||||
- Run an Ubuntu pod, overriding the default command with echo, and specifying custom arguments:
|
||||
|
||||
`kubectl run {{temp-ubuntu}} --image=ubuntu:22.04 --command -- echo {{argument1 argument2 ...}}`
|
||||
`kubectl run {{temp-ubuntu}} --image ubuntu:22.04 --command -- echo {{argument1 argument2 ...}}`
|
||||
|
||||
Reference in New Issue
Block a user