kubectl config set-context --current (#15194)
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
f34ad033b8
commit
b692fddd32
@@ -69,7 +69,7 @@ kubectl create namespace limitrange-demo
|
||||
To avoid passing the target limitrange-demo in your kubectl commands, change your context with the following command
|
||||
|
||||
```shell
|
||||
kubectl config set-context $(kubectl config current-context) --namespace=limitrange-demo
|
||||
kubectl config set-context --current --namespace=limitrange-demo
|
||||
```
|
||||
|
||||
Here is the configuration file for a LimitRange object:
|
||||
|
||||
@@ -79,7 +79,7 @@ Puedes indicar de forma permanente el espacio de nombres para todas las llamadas
|
||||
en dicho contexto.
|
||||
|
||||
```shell
|
||||
kubectl config set-context $(kubectl config current-context) --namespace=<insert-namespace-name-here>
|
||||
kubectl config set-context --current --namespace=<insert-namespace-name-here>
|
||||
# Validate it
|
||||
kubectl config view | grep namespace:
|
||||
```
|
||||
|
||||
@@ -67,7 +67,7 @@ kubectl --namespace=<insert-namespace-name-here> get pods
|
||||
Kamu dapat menyimpan konfigurasi *namespace* untuk semua perintah `kubectl` dengan perintah:
|
||||
|
||||
```shell
|
||||
kubectl config set-context $(kubectl config current-context) --namespace=<insert-namespace-name-here>
|
||||
kubectl config set-context --current --namespace=<insert-namespace-name-here>
|
||||
# Cek namespace
|
||||
kubectl config view | grep namespace:
|
||||
```
|
||||
|
||||
@@ -76,7 +76,7 @@ kubectl --namespace=<insert-namespace-name-here> get pods
|
||||
영구적으로 저장할 수 있다.
|
||||
|
||||
```shell
|
||||
kubectl config set-context $(kubectl config current-context) --namespace=<insert-namespace-name-here>
|
||||
kubectl config set-context --current --namespace=<insert-namespace-name-here>
|
||||
# 확인하기
|
||||
kubectl config view | grep namespace:
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user