使用 kind 在 Docker 中部署 Kubernetes
Kubernetes Docker About 1,956 wordskind 名字含义
Kubernetes in Dokcer
安装 kind
下载二进制文件
curl -k -Lo ./kind https://kind.sigs.k8s.io/dl/v0.14.0/kind-linux-amd64
添加可执行权限
chmod +x ./kind
移动至系统环境
mv ./kind /usr/bin/kind
安装 kubectl
下载二进制文件
curl -k -LO "https://dl.k8s.io/release/$(curl -k -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
添加可执行权限
chmod +x ./kubectl
移动至系统环境
mv ./kubectl /usr/bin/kubectl
创建 Kubernetes
kind create cluster
输出
localhost:~# kind create cluster
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.24.0) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
卸载 Kubernetes
kind delete cluster
获取集群名称
kind get clusters
列出使用镜像
docker exec -it kind-control-plane crictl images
输出
IMAGE TAG IMAGE ID SIZE
docker.io/kindest/kindnetd v20220510-4929dd75 6fb66cd78abfe 45.2MB
docker.io/kindest/local-path-helper v20220512-507ff70b 64623e9d887d3 2.86MB
docker.io/kindest/local-path-provisioner v0.0.22-kind.0 4c1e997385b8f 17.4MB
k8s.gcr.io/coredns/coredns v1.8.6 a4ca41631cc7a 13.6MB
k8s.gcr.io/etcd 3.5.3-0 aebe758cef4cd 102MB
k8s.gcr.io/kube-apiserver v1.24.0 9ef4b1de3be49 77.3MB
k8s.gcr.io/kube-controller-manager v1.24.0 efa8a439d1460 65.6MB
k8s.gcr.io/kube-proxy v1.24.0 6960c0e47829d 112MB
k8s.gcr.io/kube-scheduler v1.24.0 41f5241e3396e 52.3MB
k8s.gcr.io/pause 3.6 6270bb605e12e 302kB
开源地址
https://github.com/kubernetes-sigs/kind
官方文档
Views: 1,452 · Posted: 2022-11-11
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...