update
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
# 安装kubectl
|
||||
|
||||
```sh
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
chmod +x kubectl
|
||||
sudo mv kubectl /usr/local/bin/kubectl
|
||||
kubectl version --client
|
||||
```
|
||||
配置自动补全
|
||||
```sh
|
||||
source <(kubectl completion bash) # 临时生效
|
||||
echo "source <(kubectl completion bash)" >> ~/.bashrc # 永久生效
|
||||
```
|
||||
|
||||
# 设置默认 context
|
||||
```sh
|
||||
kubectl config use-context <context-name>
|
||||
|
||||
Reference in New Issue
Block a user