【Kubernetes实战】(六)Kind方式部署Kubernetes

目录

一、安装kind

二、安装kubectl

三、创建 Kubernetes


一、安装kind

操作系统环境

CentOS Linux release 7.6.1810 (Core)


1、下载二进制文件
curl -k -Lo ./kind https://kind.sigs.k8s.io/dl/v0.14.0/kind-linux-amd64

2、添加可执行权限
chmod +x ./kind

3、移动至系统环境
mv ./kind /usr/bin/kind

二、安装kubectl


1、下载二进制文件
curl -k -LO "https://dl.k8s.io/release/$(curl -k -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

2、添加可执行权限
chmod +x ./kubectl

3、移动至系统环境
mv ./kubectl /usr/bin/kubectl

三、创建 Kubernetes


1、创建集群
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

2、卸载 Kubernetes
kind delete cluster

3、获取集群名称
kind get clusters

4、列出使用镜像
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://kind.sigs.k8s.io/
https://github.com/kubernetes-sigs/kind

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

forest_long

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值