9

Kind:一个容器创建K8S开发集群

 3 years ago
source link: https://www.yp14.cn/2020/11/01/Kind%EF%BC%9A%E4%B8%80%E4%B8%AA%E5%AE%B9%E5%99%A8%E5%88%9B%E5%BB%BAK8S%E5%BC%80%E5%8F%91%E9%9B%86%E7%BE%A4/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Kind:一个容器创建K8S开发集群

2020-11-01

什么是 Kind

kind:是一种使用Docker容器节点运行本地Kubernetes集群的工具。该类型主要用于测试Kubernetes,但可用于本地开发或CI。

注意:kind仍在开发中

Mac & Linux

1
2
3
$ curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.9.0/kind-$(uname)-amd64"
$ chmod +x ./kind
$ mv ./kind /some-dir-in-your-PATH/kind

Mac 上使用 brew 安装

1
$ brew install kind

Windows

1
2
3
4
5
$ curl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.9.0/kind-windows-amd64
Move-Item .\kind-windows-amd64.exe c:\some-dir-in-your-PATH\kind.exe

# OR via Chocolatey (https://chocolatey.org/packages/kind)
$ choco install kind

K8S集群创建与删除

1
2
# 创建集群,默认集群名称为 kind
$ kind create cluster
kind-create-cluster.png

一个 Docker 容器创建的 K8S 集群

kind-docker.png

列出K8S集群pods

kind-pods-all.png
1
2
3
4
5
6
7
8
# 定义集群名称
$ kind create cluster --name kind-2

# 查询集群
$ kind get clusters

# 删除集群
$ kind delete cluster
1
2
# 列出集群镜像
$ docker exec -it my-node-name crictl images
kind-list-image.png
---本文结束感谢您的阅读。微信扫描二维码,关注我的公众号---
ypxz-2.png

扫一扫,分享到微信

微信分享二维码

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK