原文 | 翻译 |
---|---|
kind is a tool for running local Kubernetes clusters using Docker container “nodes”. | kind是一个使用Docker容器作为节点来运行本地K8s集群的工具 |
kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI. | kind本来主要设计用于验证K8s自身,但是也可以用于本地部署或者持续集成 |
If you have go (1.17+) and docker installed go install sigs.k8s.io/kind@v0.12.0 && kind create cluster is all you need! | 如果你有go(1.17以上版本)并且安装了docker,那么你只需要执行go install sigs.k8s.io/kind@v0.12.0 && kind create cluster |
For older versions use GO111MODULE=“on” go get sigs.k8s.io/kind@v0.12.0. | 对于老版本使用GO111MODULE=“on” go get sigs.k8s.io/kind@v0.12.0. |
原文 | 翻译 |
---|---|
kind consists of: | kind由以下部分组成 |
Go packages implementing cluster creation, image build, etc. | 实现集群创建,镜像构建等的go包 |
A command line interface (kind) built on these packages. | 以及基于这些包的命令行界面(kind) |
Docker image(s) written to run systemd, Kubernetes, etc. | 一些为运行systemd,K8s而写的docker镜像 |
kubetest integration also built on these packages (WIP) | kubetest也基于这些包构建 |
kind bootstraps each “node” with kubeadm. For more details see the design documentation. | kind使用kubeadm来启动各个节点,参见设计文档获得更多细节 |
NOTE: kind is still a work in progress, see the 1.0 roadmap. | 注意:kind还在发展中,参见1.0规划 |
Installation and usage | 安装和使用 |
For more detailed instructions see the user guide. | 参见用户指南获得更多细节介绍 |
You can install kind with go get sigs.k8s.io/kind. This will put kind in $(go env GOPATH)/bin. You may need to add that directory to your $PATH as shown here if you encounter the error kind: command not found after installation. | 你可以使用 go get sigs.k8s.io/kind 安装kind,这将把kind放在 $(go env GOPATH)/bin .如果你在安装后碰到这个错误kind: command not found,你可能需要如这里展示的那样将这个目录添加到你的 $PATH |
To use kind, you will also need to install docker. | 想使用kind需要安装docker |
Once you have docker running you can create a cluster with: | 当你docker运行时,你可以这样创建一个集群 |
kind create cluster | kind create cluster |
To delete your cluster use: | 删除你的集群 |
kind delete cluster | kind delete cluster |
To create a cluster from Kubernetes source: | 从K8s源创建一个集群 |
ensure that Kubernetes is cloned in $(go env GOPATH)/src/k8s.io/kubernetes | 确定K8s已经克隆到 $(go env GOPATH)/src/k8s.io/kubernetes |
build a node image and create a cluster with | 创建节点镜像并创建集群: |
kind build node-image | kind build node-image |
kind create cluster --image kindest/node:latest | kind create cluster --image kindest/node:latest |
Multi-node clusters and other advanced features may be configured with a config file, for more usage see the user guide or run kind [command] --help | 多节点集群和其他高级特性可以通过配置一个配置文件来完成,更多用法参见用户指南或者运行 kind [command] --help |
Community
Please reach out for bugs, feature requests, and other issues!
The maintainers of this project are reachable via:
Kubernetes Slack in the #kind channel
filing an issue against this repo
The Kubernetes SIG-Testing Mailing List
Current maintainers are @BenTheElder, @munnerz, @aojea, and @amwat – feel free to reach out directly if you have any questions!
Pull Requests are very welcome!
If you’re planning a new feature, please file an issue to discuss first.
Check the issue tracker for help wanted issues if you’re unsure where to start, or feel free to reach out to discuss. 🙂
See also: our own contributor guide and the Kubernetes community page.
Why kind?
- kind supports multi-node (including HA) clusters
- kind supports building Kubernetes release builds from source
– support for make / bash or docker, in addition to pre-published builds - kind supports Linux, macOS and Windows
- kind is a CNCF certified conformant Kubernetes installer
Code of conduct
Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.