ZBLOG

kind如何管理镜像

Kind(Kubernetes in Docker)是一个用于本地快速搭建 Kubernetes 集群的工具,它使用 Docker 容器来模拟 Kubernetes 集群中的节点。

在 Kind 中管理镜像主要有以下两种方式:

  1. 使用本地镜像

在 Kind 中使用本地已经存在的镜像,可以通过使用 --image 参数来指定某个镜像作为节点的镜像。例如:

  1. kind create cluster --name my-cluster --image my-image:latest
  1. 使用镜像仓库

在 Kind 中使用镜像仓库来获取需要的镜像,可以通过编写一个 YAML 文件来指定需要使用的镜像和镜像仓库信息。例如:

  1. # kind.yaml
  2. kind: Cluster
  3. apiVersion: kind.x-k8s.io/v1alpha4
  4. nodes:
  5. - role: control-plane
  6. image: my-registry/my-custom-node-image:v1.18.4
  7. - role: worker
  8. image: my-registry/my-custom-node-image:v1.18.4

然后使用以下命令启动集群:

  1. kind create cluster --config kind.yaml

以上就是在 Kind 中管理镜像的两种方式。

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=1271

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?