mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-26 19:55:23 +00:00
Remove blank lines after code block markers
This commit is contained in:
@@ -20,20 +20,17 @@ Kind 是一个二进制文件,并在 PATH 中即可使用。以下是不同系
|
||||
```bash
|
||||
brew install kind
|
||||
```
|
||||
|
||||
#### Linux / Windows
|
||||
|
||||
可以下载二进制文件:
|
||||
|
||||
```bash
|
||||
|
||||
## Linux AMD64
|
||||
|
||||
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
|
||||
chmod +x ./kind
|
||||
sudo mv ./kind /usr/local/bin/kind
|
||||
```
|
||||
|
||||
### 14.4.3 创建集群
|
||||
|
||||
最简单的创建方式:
|
||||
@@ -41,13 +38,11 @@ sudo mv ./kind /usr/local/bin/kind
|
||||
```bash
|
||||
kind create cluster
|
||||
```
|
||||
|
||||
指定集群名称:
|
||||
|
||||
```bash
|
||||
kind create cluster --name my-cluster
|
||||
```
|
||||
|
||||
### 14.4.4 与集群交互
|
||||
|
||||
Kind 会自动将 kubeconfig 合并到 `~/.kube/config`。
|
||||
@@ -56,7 +51,6 @@ Kind 会自动将 kubeconfig 合并到 `~/.kube/config`。
|
||||
kubectl cluster-info --context kind-kind
|
||||
kubectl get nodes
|
||||
```
|
||||
|
||||
### 14.4.5 高级用法:配置集群
|
||||
|
||||
创建一个 `kind-config.yaml` 来定制集群,例如映射端口到宿主机:
|
||||
@@ -73,13 +67,11 @@ nodes:
|
||||
- role: worker
|
||||
- role: worker
|
||||
```
|
||||
|
||||
应用配置:
|
||||
|
||||
```bash
|
||||
kind create cluster --config kind-config.yaml
|
||||
```
|
||||
|
||||
### 14.4.6 删除集群
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user