kubectl-*: add short/long options and subcommands (#21511)

* kubectl-*: add short/long options and subcommands

* Update kubectl-wait.md

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>

* added short/long subcommand to english page

* Update kubectl-wait.md

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>

* update spanish translation

---------

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
This commit is contained in:
Nelson Figueroa
2026-03-19 15:45:27 -07:00
committed by GitHub
parent ba60f61bf6
commit b68ea69008
6 changed files with 17 additions and 17 deletions
+4 -4
View File
@@ -5,16 +5,16 @@
- Espera a que un despliegue esté disponible:
`kubectl wait --for=condition=available deployment/{{nombre_del_despliegue}}`
`kubectl wait --for condition=available deployment/{{nombre_del_despliegue}}`
- Espera a que todos los pods con una determinada etiqueta ([l]) estén listos:
`kubectl wait --for=condition=ready pod -l {{etiqueta_clave}}={{etiqueta_valor}}`
`kubectl wait --for condition=ready {{[po|pods]}} {{[-l|--selector]}} {{etiqueta_clave}}={{etiqueta_valor}}`
- Espera a que se elimine un pod:
`kubectl wait --for=delete pod {{nombre_del_pod}}`
`kubectl wait --for delete {{[po|pods]}} {{nombre_del_pod}}`
- Espera a que se complete un trabajo, en un plazo de 120 segundos (si la condición no se cumple a tiempo, el estado de salida será fallido):
`kubectl wait --for=condition=complete job/{{nombre_del_trabajo}} --timeout 120s`
`kubectl wait --for condition=complete job/{{nombre_del_trabajo}} --timeout 120s`
+4 -4
View File
@@ -13,16 +13,16 @@
- 배포 생성:
`kubectl create deployment {{배포_이름}} --image={{이미지}}`
`kubectl create {{[deploy|deployment]}} {{배포_이름}} --image {{이미지}}`
- 복제본과 함께 배포 생성:
`kubectl create deployment {{배포_이름}} --image={{이미지}} --replicas={{복제본_수}}`
`kubectl create {{[deploy|deployment]}} {{배포_이름}} --image {{이미지}} --replicas {{복제본_수}}`
- 서비스 생성:
`kubectl create service {{서비스_유형}} {{서비스_이름}} --tcp={{포트}}:{{대상_포트}}`
`kubectl create {{[svc|service]}} {{서비스_유형}} {{서비스_이름}} --tcp {{포트}}:{{대상_포트}}`
- 네임스페이스 생성:
`kubectl create namespace {{네임스페이스_이름}}`
`kubectl create {{[ns|namespace]}} {{네임스페이스_이름}}`
+3 -3
View File
@@ -5,12 +5,12 @@
- 컨테이너 포트에서 노드 포트로 제공될 리소스에 대한 서비스 생성:
`kubectl expose {{리소스_타입}} {{리소스_이름}} --port={{노드_포트}} --target-port={{컨테이너_포트}}`
`kubectl expose {{리소스_타입}} {{리소스_이름}} --port {{노드_포트}} --target-port {{컨테이너_포트}}`
- 파일로 식별된 리소스에 대한 서비스 생성:
`kubectl expose {{[-f|--filename]}} {{경로/대상/파일.yml}} --port={{노드_포트}} --target-port={{컨테이너_포트}}`
`kubectl expose {{[-f|--filename]}} {{경로/대상/파일.yml}} --port {{노드_포트}} --target-port {{컨테이너_포트}}`
- 컨테이너 포트와 동일한 노드 포트로 제공할 이름이 있는 서비스 생성:
`kubectl expose {{리소스_타입}} {{리소스_이름}} --port={{노드_포트}} --name={{서비스_이름}}`
`kubectl expose {{리소스_타입}} {{리소스_이름}} --port {{노드_포트}} --name {{서비스_이름}}`
+1 -1
View File
@@ -13,4 +13,4 @@
- 강제로 교체: 리소스를 삭제한 후 다시 생성:
`kubectl replace --force {{[-f|--filename]}} {{경로/대상/파일.yml}}`
`kubectl replace {{[-f|--filename]}} {{경로/대상/파일.yml}} --force`
+3 -3
View File
@@ -5,12 +5,12 @@
- 레플리카 세트 크기 조정:
`kubectl scale --replicas={{레플리카_수}} rs/{{레플리카_이름}}`
`kubectl scale --replicas {{레플리카_수}} rs/{{레플리카_이름}}`
- 파일로 식별된 리소스 크기 조정:
`kubectl scale --replicas={{레플리카_수}} {{[-f|--filename]}} {{경로/대상/파일.yml}}`
`kubectl scale --replicas {{레플리카_수}} {{[-f|--filename]}} {{경로/대상/파일.yml}}`
- 현재 레플리카 수를 기준으로 배포 크기 조정:
`kubectl scale --current-replicas={{현재_레플리카_수}} --replicas={{레플리카_수}} deployment/{{배포_이름}}`
`kubectl scale --replicas {{레플리카_수}} --current-replicas {{현재_레플리카_수}} {{[deploy|deployment]}}/{{배포_이름}}`
+2 -2
View File
@@ -9,11 +9,11 @@
- Wait for all pods with a certain [l]abel to be ready:
`kubectl wait --for condition=ready pod {{[-l|--selector]}} {{label_key}}={{label_value}}`
`kubectl wait --for condition=ready {{[po|pods]}} {{[-l|--selector]}} {{label_key}}={{label_value}}`
- Wait for a pod to be deleted:
`kubectl wait --for delete pod {{pod_name}}`
`kubectl wait --for delete {{[po|pods]}} {{pod_name}}`
- Wait for a job to complete, within 120 seconds (if the condition isn't met on time, the exit status will be unsuccessful):