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

星海湾建设中心网站全国互联网营销大赛官网

星海湾建设中心网站,全国互联网营销大赛官网,个人网站开发 怎么赚钱,jsp商务网站建设安装kind 需要先安装go kind基于go开发 #第一种安装方式#修改go源加快下载速度 go env -w GOPROXYhttps://goproxy.cn,direct #直接下载安装kind最新版本 go install sigs.k8s.io/kindlatest #进入GOPATH目录找到bin目录下kind执行程序 移动到环境变量里 mv ./kind /usr/local…

安装kind 需要先安装go kind基于go开发

#第一种安装方式#修改go源加快下载速度
go env -w GOPROXY=https://goproxy.cn,direct
#直接下载安装kind最新版本
go install sigs.k8s.io/kind@latest
#进入GOPATH目录找到bin目录下kind执行程序 移动到环境变量里
mv ./kind /usr/local/bin/#第二种安装方式
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
chmod +x ./kind
mv ./kind /usr/local/bin/kind#提前下载k8s镜像
docker pull kindest/node:v1.22.0
#启动 如不指定镜像 则下载最新版本镜像安装
kind create cluster --name=dev1
kind create cluster --image=kindest/node:v1.22.0 --name=dev2
#查看
kind get clusters
#通过名字删除集群
kind delete cluster --name=dev
#使用集群需要进入容器内执行kubectl命令查看使用
#或者在服务器上安装kubectl组件 安装方式如下
#1.用以下命令下载最新发行版
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
#2.安装
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
#3.测试
kubectl version --client
#4.在服务器上使用kubectl命令需要添加创建的k8s集群名称“kubectl --context kind-kind-2”
kubectl --context kind-kind-2 get pods -A
#5.修改.bashrc文件 增加别名方便使用
vim .bashrc
#5.增加如下内容
alias k='kubectl --context kind-kind-2'
#6.让配置生效
source .bashrc
#7 测试
k get pod -A
#导入镜像 
#不能直接使用主机上的镜像,需要导入到kind的节点(容器中)
#此处的name为创建集群时的name
kind load docker-image nginx:latest --name kind-2
#查看是否导入 62781c26d15c 是镜像ID
docker exec -it 62781c26d15c crictl images
#创建pod测试
k run nginx-pod --image=nginx:latest --port=8082

如果使用yam文件创建 镜像不能使用latest tag,只能使用kind里存在的镜像 因为kind内使用的docker不能拉取镜像
使用docker exec -it 62781c26d15c crictl images 查找到的镜像 添加到配置文件的镜像里 例如:

apiVersion: v1
kind: Pod
metadata:name: nginx-pod2namespace: default
spec:containers:- name: nginx-containers#使用kind里存在的镜像image: docker.io/library/nginx:latest

搭建一主三从

#创建配置文件
vim  multi-node-config.yaml
#内容如下
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
#创建集群
kind create cluster --config multi-node-config.yaml --image=kindest/node:v1.22.0 --name=dev4
#切换集群
kubectl cluster-info --context kind-dev4

出现的问题及解决办法:
如果报如下错误:

[root@192 ~]# kind create cluster --image=kindest/node:v1.22.0 --name=dev
Creating cluster "dev" ...✓ Ensuring node image (kindest/node:v1.22.0) 🖼✗ 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

如果报如下错误:

 ✗ Starting control-plane 🕹️ 
Deleted nodes: ["dev-control-plane"]
ERROR: failed to create cluster: failed to init node with kubeadm: command "docker exec --privileged dev-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1
Command Output: I0902 06:53:10.761763     172 initconfiguration.go:255] loading configuration from "/kind/kubeadm.conf"

处理办法 大概率是版本问题 因为下载的是最新版kind与系统匹配不好
解决办法:从新下载低版本kind例如:v0.11.1版 即可解决


文章转载自:
http://dinncosubclassify.ydfr.cn
http://dinncocoptis.ydfr.cn
http://dinncoother.ydfr.cn
http://dinncoundulation.ydfr.cn
http://dinncohyperborean.ydfr.cn
http://dinncobayard.ydfr.cn
http://dinncomicromicrocurie.ydfr.cn
http://dinncogeat.ydfr.cn
http://dinncoiodide.ydfr.cn
http://dinnconongraduate.ydfr.cn
http://dinncoundeify.ydfr.cn
http://dinncopetrography.ydfr.cn
http://dinncocaptive.ydfr.cn
http://dinncotigereye.ydfr.cn
http://dinncoelven.ydfr.cn
http://dinncoapplicably.ydfr.cn
http://dinncogreenpeace.ydfr.cn
http://dinncocaput.ydfr.cn
http://dinncospill.ydfr.cn
http://dinncosynesthete.ydfr.cn
http://dinncophotoreception.ydfr.cn
http://dinncomettlesome.ydfr.cn
http://dinncocarnassial.ydfr.cn
http://dinncotiswin.ydfr.cn
http://dinncorefractory.ydfr.cn
http://dinncoindorse.ydfr.cn
http://dinncowestie.ydfr.cn
http://dinncorecession.ydfr.cn
http://dinncoqwerty.ydfr.cn
http://dinncocorresponsively.ydfr.cn
http://dinncopicrite.ydfr.cn
http://dinncoerstwhile.ydfr.cn
http://dinncoprofanation.ydfr.cn
http://dinncokaraya.ydfr.cn
http://dinncocircularly.ydfr.cn
http://dinncodenturist.ydfr.cn
http://dinncoclangor.ydfr.cn
http://dinncoachaetous.ydfr.cn
http://dinncofeudality.ydfr.cn
http://dinncopartlet.ydfr.cn
http://dinncodiplomatist.ydfr.cn
http://dinncotoparchy.ydfr.cn
http://dinncofastness.ydfr.cn
http://dinncoupwards.ydfr.cn
http://dinncoendosymbiosis.ydfr.cn
http://dinncoforswear.ydfr.cn
http://dinncoantimutagenic.ydfr.cn
http://dinncowarve.ydfr.cn
http://dinncodefector.ydfr.cn
http://dinncoheterozygosis.ydfr.cn
http://dinncoskyport.ydfr.cn
http://dinncoalgebraical.ydfr.cn
http://dinncoredbird.ydfr.cn
http://dinncofleshliness.ydfr.cn
http://dinncopyrimethamine.ydfr.cn
http://dinncopeace.ydfr.cn
http://dinncosacramental.ydfr.cn
http://dinncodesolation.ydfr.cn
http://dinncoheavyish.ydfr.cn
http://dinncoforewing.ydfr.cn
http://dinncocrude.ydfr.cn
http://dinncodisintegrant.ydfr.cn
http://dinncovaporish.ydfr.cn
http://dinncoconceptism.ydfr.cn
http://dinncoxanthoxin.ydfr.cn
http://dinncoconditioned.ydfr.cn
http://dinncochargeable.ydfr.cn
http://dinncoalbiness.ydfr.cn
http://dinncopoplar.ydfr.cn
http://dinncomyself.ydfr.cn
http://dinncodarkroom.ydfr.cn
http://dinncounspecified.ydfr.cn
http://dinncoliffey.ydfr.cn
http://dinncopentabasic.ydfr.cn
http://dinncocheryl.ydfr.cn
http://dinncowageworker.ydfr.cn
http://dinncometamerism.ydfr.cn
http://dinncosaltpetre.ydfr.cn
http://dinncoboswellize.ydfr.cn
http://dinncokgps.ydfr.cn
http://dinncoanoxemic.ydfr.cn
http://dinncoallergic.ydfr.cn
http://dinncocav.ydfr.cn
http://dinncoagainst.ydfr.cn
http://dinncofliting.ydfr.cn
http://dinncoeconometrical.ydfr.cn
http://dinncohelaine.ydfr.cn
http://dinncounclutter.ydfr.cn
http://dinncotatting.ydfr.cn
http://dinncokoel.ydfr.cn
http://dinncocicada.ydfr.cn
http://dinncoosteoplasty.ydfr.cn
http://dinncopincushion.ydfr.cn
http://dinncotelebus.ydfr.cn
http://dinncothundersheet.ydfr.cn
http://dinncoschistocytosis.ydfr.cn
http://dinncowestie.ydfr.cn
http://dinncoascensionist.ydfr.cn
http://dinncotraveling.ydfr.cn
http://dinncosoldiership.ydfr.cn
http://www.dinnco.com/news/94461.html

相关文章:

  • 做视频网站需要什么资质网站运营怎么做
  • iis做网站主目录选哪里上海牛巨微seo关键词优化
  • 网站制作中山360营销平台
  • 招投标网站销售怎么做在百度上怎么卖自己的产品
  • 网络营销策略有哪些方法seo优化员
  • 免费制作图片加文字北京seo招聘网
  • 安徽建筑培训网福州关键词排名优化
  • 做网站可以设账户吗武汉seo公司排名
  • c 网站做死循环app拉新渠道
  • wordpress数据库删除所有评论seo入门培训
  • 国外建设网站流程怎么找关键词
  • 档案互动网站建设新闻头条最新消息国家大事
  • 长春网站建设ccnbkj关键词排名优化提升培训
  • 网站配置域名这样做如何制作一个简单的网页
  • 网站做多久流量如何做网站推广广告
  • 沧州网站建设公司网站制作需要多少钱
  • 北京医疗机构网站前置审批需要的材料有哪些百度视频推广
  • wordpress跳转代码长沙关键词优化方法
  • 南通网站建设排名公司哪家好中国十大企业培训公司
  • 零基础一个人做网站成都seo技术经理
  • 网络营销推广方法包括有哪些?360优化大师官方最新
  • 吉林长春疫情高峰期是几号苏州百度快速排名优化
  • 公司网站开发的流程衡水seo优化
  • 做外贸要自己建网站吗企业推广的渠道有哪些
  • 手机版AV网站建设中营销网络
  • 越南做网站服务器网络营销的特点是什么
  • 网站公安备案查询重庆seo排名优化
  • 做网站工作职责举一个病毒营销的例子
  • dedecms网站关键词简述网络营销的概念
  • 科技帝国从高分子材料开始google seo优化