mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-23 16:04:14 +02:00
kubectl-{describe, delete, create, taint}: add option placeholders (#17659)
This commit is contained in:
parent
0b743d6234
commit
82367329f4
4 changed files with 17 additions and 17 deletions
|
@ -13,16 +13,16 @@
|
|||
|
||||
- Create a deployment:
|
||||
|
||||
`kubectl create deployment {{deployment_name}} --image={{image}}`
|
||||
`kubectl create {{[deploy|deployment]}} {{deployment_name}} --image={{image}}`
|
||||
|
||||
- Create a deployment with replicas:
|
||||
|
||||
`kubectl create deployment {{deployment_name}} --image={{image}} --replicas={{number_of_replicas}}`
|
||||
`kubectl create {{[deploy|deployment]}} {{deployment_name}} --image={{image}} --replicas={{number_of_replicas}}`
|
||||
|
||||
- Create a service:
|
||||
|
||||
`kubectl create service {{service_type}} {{service_name}} --tcp={{port}}:{{target_port}}`
|
||||
`kubectl create {{[svc|service]}} {{service_type}} {{service_name}} --tcp={{port}}:{{target_port}}`
|
||||
|
||||
- Create a namespace:
|
||||
|
||||
`kubectl create namespace {{namespace_name}}`
|
||||
`kubectl create {{[ns|namespace]}} {{namespace_name}}`
|
||||
|
|
|
@ -5,27 +5,27 @@
|
|||
|
||||
- Delete a specific pod:
|
||||
|
||||
`kubectl delete pod {{pod_name}}`
|
||||
`kubectl delete {{[po|pod]}} {{pod_name}}`
|
||||
|
||||
- Delete a specific deployment:
|
||||
|
||||
`kubectl delete deployment {{deployment_name}}`
|
||||
`kubectl delete {{[deploy|deployment]}} {{deployment_name}}`
|
||||
|
||||
- Delete a specific node:
|
||||
|
||||
`kubectl delete node {{node_name}}`
|
||||
`kubectl delete {{[no|node]}} {{node_name}}`
|
||||
|
||||
- Delete all pods in a specified namespace:
|
||||
|
||||
`kubectl delete pods --all --namespace {{namespace}}`
|
||||
`kubectl delete {{[po|pods]}} --all {{[-n|--namespace]}} {{namespace}}`
|
||||
|
||||
- Delete all deployments and services in a specified namespace:
|
||||
|
||||
`kubectl delete deployments,services --all --namespace {{namespace}}`
|
||||
`kubectl delete {{[deploy|deployment]}},{{[svcľservices]}} --all {{[-n|--namespace]}} {{namespace}}`
|
||||
|
||||
- Delete all nodes:
|
||||
|
||||
`kubectl delete nodes --all`
|
||||
`kubectl delete {{[no|nodes]}} --all`
|
||||
|
||||
- Delete resources defined in a YAML manifest:
|
||||
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
|
||||
- Show details of pods in a namespace:
|
||||
|
||||
`kubectl describe pods {{[-n|--namespace]}} {{namespace}}`
|
||||
`kubectl describe {{[po|pods]}} {{[-n|--namespace]}} {{namespace}}`
|
||||
|
||||
- Show details of nodes in a namespace:
|
||||
|
||||
`kubectl describe nodes {{[-n|--namespace]}} {{namespace}}`
|
||||
`kubectl describe {{[no|nodes]}} {{[-n|--namespace]}} {{namespace}}`
|
||||
|
||||
- Show the details of a specific pod in a namespace:
|
||||
|
||||
`kubectl describe pods {{pod_name}} {{[-n|--namespace]}} {{namespace}}`
|
||||
`kubectl describe {{[po|pods]}} {{pod_name}} {{[-n|--namespace]}} {{namespace}}`
|
||||
|
||||
- Show the details of a specific node in a namespace:
|
||||
|
||||
`kubectl describe nodes {{node_name}} {{[-n|--namespace]}} {{namespace}}`
|
||||
`kubectl describe {{[no|nodes]}} {{node_name}} {{[-n|--namespace]}} {{namespace}}`
|
||||
|
||||
- Show details of Kubernetes objects defined in a YAML manifest file:
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
- Apply taint to a node:
|
||||
|
||||
`kubectl taint nodes {{node_name}} {{label_key}}={{label_value}}:{{effect}}`
|
||||
`kubectl taint {{[no|nodes]}} {{node_name}} {{label_key}}={{label_value}}:{{effect}}`
|
||||
|
||||
- Remove taint from a node:
|
||||
|
||||
`kubectl taint nodes {{node_name}} {{label_key}}:{{effect}}-`
|
||||
`kubectl taint {{[no|nodes]}} {{node_name}} {{label_key}}:{{effect}}-`
|
||||
|
||||
- Remove all taints from a node:
|
||||
|
||||
`kubectl taint nodes {{node_name}} {{label_key}}-`
|
||||
`kubectl taint {{[no|nodes]}} {{node_name}} {{label_key}}-`
|
||||
|
|
Loading…
Add table
Reference in a new issue