当前位置: 首页 > news >正文

网站的相关链接怎么做贵州网站制作设计公司哪家好

网站的相关链接怎么做,贵州网站制作设计公司哪家好,网站福利你们会回来感谢我的,开通微网站云原生学习路线导航页(持续更新中) 本文是 环境安装 系列文章,介绍 使用Kind工具 快速安装 kubernetes 测试集群的详细步骤 1.Kind简介 Kind 是一个使用 Docker 容器“节点”运行本地 Kubernetes 集群的工具。Kind 主要用于测试kubernetes本…

云原生学习路线导航页(持续更新中)

本文是 环境安装 系列文章,介绍 使用Kind工具 快速安装 kubernetes 测试集群的详细步骤

1.Kind简介

  • Kind 是一个使用 Docker 容器“节点”运行本地 Kubernetes 集群的工具。
  • Kind 主要用于测试kubernetes本身,但也可用于本地开发或 CI。

2.Kind安装kubernetes集群

2.1.确保已经安装了go环境

# 创建gopath目录
$ mkdir /root/go
$ cd /root/go# 获取go安装包
$ wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz# 解压并加入/usr/local目录
$ tar -C /usr/local -zxf go1.22.1.linux-amd64.tar.gz# 导出go环境变量
$ vim /# 在文件最后加上下面这些export GOROOT=/usr/local/goexport GOPATH=/root/goexport GOPROXY=https://goproxy.cn,directexport PATH=$PATH:$GOROOT/bin:$GOPATH/bin# 刷新环境变量
$ source /etc/profile# 查看go版本,检查是否安装成功
$ go version

2.2.确保已经安装了docker

  • 没有安装docker的,执行命令安装
    # 卸载旧版本docker
    $ sudo yum remove docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-latest-logrotate \docker-logrotate \docker-selinux \docker-engine-selinux \docker-engine# 安装依赖包
    $ sudo yum install -y yum-utils# 添加 yum 软件源
    $ sudo yum-config-manager \--add-repo \https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    $ sudo sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo# 更新 yum 软件源缓存,并安装 docker-ce
    $ sudo yum install docker-ce docker-ce-cli containerd.io# 使用脚本自动安装
    $ curl -fsSL get.docker.com -o get-docker.sh
    $ sudo sh get-docker.sh --mirror Aliyun# 启动docker
    $ sudo systemctl enable docker
    $ sudo systemctl start docker# 如果非root用户,用下面的命令加入docker组
    $ sudo groupadd docker
    $ sudo usermod -aG docker $USER# 测试 Docker 是否安装正确,有下面的输出则安装成功
    $ docker run --rm hello-worldUnable to find image 'hello-world:latest' locally
    latest: Pulling from library/hello-world
    b8dfde127a29: Pull complete
    Digest: sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24
    Status: Downloaded newer image for hello-world:latestHello from Docker!
    This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/
    

2.3.安装kind

2.3.1.安装命令

```sh
# 安装kind工具,会安装到 $GOPATH/bin 目录下
$ go install sigs.k8s.io/kind@v0.20.0# 验证kind是否安装成功
$ kind version# 安装集群,有下面的输出,说明安装成功
$ kind create cluster
Creating cluster "kind" ...✓ Ensuring node image (kindest/node:v1.27.3) 🖼✓ 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-kindHave a nice day! 👋
```

2.3.2.安装过程遇到cgroup报错

  • 报错信息
    $ kind create cluster
    ✓ Ensuring node image (kindest/node:v1.27.3) 🖼
    ✗ Preparing nodes 📦  
    Deleted nodes: ["dev-control-plane"]
    ERROR: failed to create cluster: command "docker run --name dev-control-plane --hostname dev-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --label io.x-k8s.kind.cluster=dev --net kind --restart=on-failure:1 --init=false --cgroupns=private --volume /dev/mapper:/dev/mapper --publish=127.0.0.1:33059:6443/TCP -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node:v1.22.0" failed with error: exit status 125
    Command Output: WARNING: Your kernel does not support cgroup namespaces.  Cgroup namespace setting discarded.
    a416609b76ef8e1bf4fdac66c159a0f1396841464aec2c8cc6e667fc83be83fe
    docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: cgroup namespaces aren't enabled in the kernel: unknown.
    
  • 原因:内核版本太低,不支持cgroup
  • 解决方法:对内核升级
    #1 更新系统,确保所有安装的包都是最新的
    $ sudo yum update#2安装 elrepo 仓库,该仓库提供了最新的稳定内核
    $ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
    $ sudo yum install -y https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm#3 安装新的内核(例如,最新的稳定版本是 kernel-ml)
    $ sudo yum --enablerepo=elrepo-kernel install kernel-ml -y#4 更新GRUB引导菜单
    $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg#5 修改默认引导顺序,使新内核成为默认引导
    $ sudo grub2-set-default 0#6 重新启动系统,确认新内核成功安装并生效
    $ sudo reboot
    

2.3.3.安装过程遇到 failed to init node with kubeadm 错误

  • 错误信息
    $ kind create cluster
    Creating cluster "kind" ...✓ Ensuring node image (kindest/node:v1.29.1) 🖼✓ Preparing nodes 📦✓ Writing configuration 📜✗ Starting control-plane 🕹️
    Deleted nodes: ["kind-control-plane"]
    ERROR: failed to create cluster: failed to init node with kubeadm: command "docker exec --privileged kind-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 126
    Command Output: cannot exec in a stopped state: unknown
    
  • 原因:kind版本太高或太低
    • 我让大家安装的是 kind 1.20.0,按照步骤来不会有问题
  • 解决方法:更换kind版本,多试几个版本
    # 重新下载合适的kind版本,更改后面的版本号
    $ go install sigs.k8s.io/kind@v0.20.0# 重新安装
    $ kind create cluster
    
http://www.yayakq.cn/news/752118/

相关文章:

  • 做精品课程网站需要啥素材加强网站信息内容建设管理
  • 网站建设外贸衡阳网页设计
  • 在线代理服务器网站天津最新消息今天
  • 网站制作软件名字线做html写的网页怎么在手机上看
  • 网站项目建设流程图全球网络营销公司排名
  • 高质量内容的重要性淘宝网站的推广与优化
  • 建设旅游网站的功能定位企业网站制作的方法
  • 嘉兴网站搜索排名wordpress istax
  • 域名注册哪个网站最便宜郑州正规的男科医院有哪些
  • 东北大学秦皇岛分校吧金华seo全网营销
  • 做加密网站全站加密的最低成本宝安中心做网站多少钱
  • 酒东莞网站建设技术支持网站建设流程资料
  • 天津做网站优化哪家好沙市网站建设
  • 贵州省网站集约化建设中国建设企业网站官网
  • 上海市建设教育网站网站建设推介会发言稿
  • 简述网站建设的一般流程网络公司经营范围包括劳务吗
  • 西安火车站网站建设怎么在国外做网站
  • 个人博客网站山东济南网站建设公司排名
  • 免费开源企业网站程序如何免费制作一个公司网站
  • 公司想做一个网站莞城建设网站
  • 百度不抓取网站建筑行业
  • 简单网站建设设计网站一级栏目
  • 如何设计营销 网站建设网站编程设计如何写备注
  • 广告位网站模板建设网站运营收入
  • 优化一个网站多少钱怎么做网站登陆战
  • 滨海县建设局网站浙江省建设局房管科网站
  • index.html网站怎么做怎么做才能发布网站
  • 视频门户网站建设项目标书建设网站 可以用3层架构吗
  • 山东网站建设公司哪家权威在线观看的seo综合查询
  • 科威网络做网站怎么样山东济南市网站建设