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

百度网站官方认证怎么做2345王牌浏览器

百度网站官方认证怎么做,2345王牌浏览器,凡客诚品官方在哪个网店,网站建设数据库设计环境准备 节点数量:2台虚拟机 centos7硬件配置:master节点内存至少3G(2G后面在master节点初始化集群时会报错,内存不够),node节点可以2G,CPU至少2个,硬盘至少30G网络要求&#xff1…

环境准备

  • 节点数量:2台虚拟机 centos7
  • 硬件配置:master节点内存至少3G(2G后面在master节点初始化集群时会报错,内存不够),node节点可以2G,CPU至少2个,硬盘至少30G
  • 网络要求:多个节点之间网络互通,每个节点能访问外网

集群规划

这两个名称是准备设置的主机名称

  • k8s-master
  • k8s-node1

设置主机名

hostnamectl set-hostname k8s-master
hostnamectl set-hostname k8s-node1
# 查看主机名
hostname

同步host文件

如果DNS不支持主机名称解析,还需要在每台机器的/etc/hosts文件添加主机名和ip的对应关系。所有机器都要同步。我自己只搞了2台虚拟机做集群。

cat >> /etc/hosts <<EOF
192.168.35.133 k8s-master
192.168.35.132 k8s-node1
EOF

关闭防火墙

所有机器都要关闭

systemctl stop firewalld && systemctl disable firewalld

关闭SELINUX

setenforce 0 && sed -i 's/SELINUX=enforcing/SELINUX=disable/g' /etc/selinux/config

关闭swap分区

每一台机器都要关闭。为什么要关?自己百度去

swapoff -a && sed -ri 's/ .*swap.*/#&/' /etc/fstab

同步时间

yum install ntpdate -y
ntpdate ntp1.aliyun.com;hwclock --systohc

安装containerd

每台机器都要安装

# 安装yum-config-manger依赖
yum install -y yum-utils device-mapper-persistent-data lvm2# 添加containerd yum源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo# 安装containerd
yum install -y containerd.io cri-tools# 配置containerd
cat > /etc/containerd/config.toml <<EOF
disabled_plugins = ["restart"]
[plugins.linux]
shim_debug = true
[plugins.cri.registry.mirrors."docker.io"]
endpoint = ["https://frz7i079.mirror.aliyuncs.com"]
[plugins.cri]
sandbox_image="registry.aliyuncs.com/google_containers/pause:3.2"
EOF# 启动containerd服务 并设置开机启动
systemctl enable containerd && systemctl start containerd && systemctl status containerd# 配置 containerd 配置
cat > /etc/modules-load.d/containerd.conf << EOF
overlay
br_netfilter
EOF# 配置k8s网络配置
cat > /etc/sysctl.d/k8s.conf <<EOF
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
EOF# 加载overlay br_netfilter模块
modprobe overlay
modprobe br_netfilter# 查看当前配置是否生效
sysctl -p /etc/sysctl.d/k8s.conf

添加源

每台机器都安装。你的cpu是x86的就选择x86的,反之选择arm的。

# 查看源
yum repolist

添加x86的源

cat <<EOF > kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gogkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF# 移动并修改
mv kubernetes.repo /etc/yum.repos.d

添加arm的源

cat << EOF > kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-aarch64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gogkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF# 移动并修改
mv kubernetes.repo /etc/yum.repos.d

安装K8s

每台机器都要安装。

# 安装最新版本
yum install -y kubelet kubeadm kubectl# 指定版本安装
yum install -y kubelet-1.26.0 kubeadm-1.26.0 kubectl-1.26.0# 启动kubelet
sudo systemctl enable kubelet && sudo systemctl start kubelet && systemctl status kubelet

初始化集群

只需要在master节点上初始化即可。

kubeadm init \
--apiserver-advertise-address=192.168.35.133 \
--image-repository registry.aliyuncs.com/google_containers \
--pod-network-cidr=10.244.0.0/16
  • --apiserver-advertise-address:master节点的IP地址
  • --image-repository:选择用于拉取控制平面镜像的容器仓库,默认的太慢了,换成阿里云的
  • --pod-network-cidr:指明pod网络可以使用的IP地址段。设置后控制平面将会为每一个节点自动分派CIDRs

K8s集群搭建

# master节点执行
mkdir -p $HOME/.kube# master节点执行
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config# master节点执行
sudo chown $(id -u):$(id -g) $HOME/.kube/config

node加入集群

# 所有node节点执行
kubeadm join 192.168.35.133:6443 --token bzotcq.9uev0sf5a19pgilp \
--discovery-token-ca-cert-hash sha256:98183ddb45ca9f9ee224c3a77fac6b524d2bf1dd31f911f5d023639f80abd43f

K8s集群搭建

master检查是否加入集群成功

kubectl get nodes

K8s集群搭建

解决节点NotReady状态

虽然集群搭建起来,但是不可用,需用通过网络插件解决该问题 https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml 在master节点创建kube-flannel.yml,输入下面内容

vi kube-flannel.yml---
kind: Namespace
apiVersion: v1
metadata:name: kube-flannellabels:k8s-app: flannelpod-security.kubernetes.io/enforce: privileged
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:labels:k8s-app: flannelname: flannel
rules:
- apiGroups:- ""resources:- podsverbs:- get
- apiGroups:- ""resources:- nodesverbs:- get- list- watch
- apiGroups:- ""resources:- nodes/statusverbs:- patch
- apiGroups:- networking.k8s.ioresources:- clustercidrsverbs:- list- watch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:labels:k8s-app: flannelname: flannel
roleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: flannel
subjects:
- kind: ServiceAccountname: flannelnamespace: kube-flannel
---
apiVersion: v1
kind: ServiceAccount
metadata:labels:k8s-app: flannelname: flannelnamespace: kube-flannel
---
kind: ConfigMap
apiVersion: v1
metadata:name: kube-flannel-cfgnamespace: kube-flannellabels:tier: nodek8s-app: flannelapp: flannel
data:cni-conf.json: |{"name": "cbr0","cniVersion": "0.3.1","plugins": [{"type": "flannel","delegate": {"hairpinMode": true,"isDefaultGateway": true}},{"type": "portmap","capabilities": {"portMappings": true}}]}net-conf.json: |{"Network": "10.244.0.0/16","Backend": {"Type": "vxlan"}}
---
apiVersion: apps/v1
kind: DaemonSet
metadata:name: kube-flannel-dsnamespace: kube-flannellabels:tier: nodeapp: flannelk8s-app: flannel
spec:selector:matchLabels:app: flanneltemplate:metadata:labels:tier: nodeapp: flannelspec:affinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: kubernetes.io/osoperator: Invalues:- linuxhostNetwork: truepriorityClassName: system-node-criticaltolerations:- operator: Existseffect: NoScheduleserviceAccountName: flannelinitContainers:- name: install-cni-pluginimage: docker.io/flannel/flannel-cni-plugin:v1.1.2#image: docker.io/rancher/mirrored-flannelcni-flannel-cni-plugin:v1.1.2command:- cpargs:- -f- /flannel- /opt/cni/bin/flannelvolumeMounts:- name: cni-pluginmountPath: /opt/cni/bin- name: install-cniimage: docker.io/flannel/flannel:v0.22.0#image: docker.io/rancher/mirrored-flannelcni-flannel:v0.22.0command:- cpargs:- -f- /etc/kube-flannel/cni-conf.json- /etc/cni/net.d/10-flannel.conflistvolumeMounts:- name: cnimountPath: /etc/cni/net.d- name: flannel-cfgmountPath: /etc/kube-flannel/containers:- name: kube-flannelimage: docker.io/flannel/flannel:v0.22.0#image: docker.io/rancher/mirrored-flannelcni-flannel:v0.22.0command:- /opt/bin/flanneldargs:- --ip-masq- --kube-subnet-mgrresources:requests:cpu: "100m"memory: "50Mi"securityContext:privileged: falsecapabilities:add: ["NET_ADMIN", "NET_RAW"]env:- name: POD_NAMEvalueFrom:fieldRef:fieldPath: metadata.name- name: POD_NAMESPACEvalueFrom:fieldRef:fieldPath: metadata.namespace- name: EVENT_QUEUE_DEPTHvalue: "5000"volumeMounts:- name: runmountPath: /run/flannel- name: flannel-cfgmountPath: /etc/kube-flannel/- name: xtables-lockmountPath: /run/xtables.lockvolumes:- name: runhostPath:path: /run/flannel- name: cni-pluginhostPath:path: /opt/cni/bin- name: cnihostPath:path: /etc/cni/net.d- name: flannel-cfgconfigMap:name: kube-flannel-cfg- name: xtables-lockhostPath:path: /run/xtables.locktype: FileOrCreate
kubectl apply -f kube-flannel.yml
 

K8s集群搭建

如果node节点还是NotReady状态,可尝试重启服务,等待几分钟再次查询

# 重启kubelet
sudo systemctl restart kubelet

K8s集群搭建


文章转载自:
http://dinncogeosyncline.stkw.cn
http://dinncomislead.stkw.cn
http://dinncostubble.stkw.cn
http://dinncolooseness.stkw.cn
http://dinncohuisache.stkw.cn
http://dinncofluoroscopist.stkw.cn
http://dinncolatticed.stkw.cn
http://dinncosomatotroph.stkw.cn
http://dinncohindi.stkw.cn
http://dinncodemocratise.stkw.cn
http://dinncohaida.stkw.cn
http://dinncoirreversible.stkw.cn
http://dinncoperonismo.stkw.cn
http://dinncotestify.stkw.cn
http://dinncopenicillinase.stkw.cn
http://dinncotiran.stkw.cn
http://dinncoyes.stkw.cn
http://dinncoscheme.stkw.cn
http://dinncounspotted.stkw.cn
http://dinncocochinos.stkw.cn
http://dinncothionyl.stkw.cn
http://dinncodemonstrative.stkw.cn
http://dinncorumble.stkw.cn
http://dinncodismemberment.stkw.cn
http://dinncofortyfold.stkw.cn
http://dinncoassuredly.stkw.cn
http://dinncodantean.stkw.cn
http://dinnconondrinker.stkw.cn
http://dinncolecithotrophic.stkw.cn
http://dinncocampanero.stkw.cn
http://dinncohomogeneous.stkw.cn
http://dinncophlebolite.stkw.cn
http://dinncounveracious.stkw.cn
http://dinncoishmaelite.stkw.cn
http://dinncohumpery.stkw.cn
http://dinncotarre.stkw.cn
http://dinncoquirinus.stkw.cn
http://dinncoosculation.stkw.cn
http://dinncocaecum.stkw.cn
http://dinncomuckle.stkw.cn
http://dinncolycanthrope.stkw.cn
http://dinncocorotate.stkw.cn
http://dinncousuriously.stkw.cn
http://dinncojowly.stkw.cn
http://dinncobade.stkw.cn
http://dinncodefibrillation.stkw.cn
http://dinncoporphyrize.stkw.cn
http://dinncoploughing.stkw.cn
http://dinncoantiproton.stkw.cn
http://dinncovivandiere.stkw.cn
http://dinncomyoid.stkw.cn
http://dinncoprodigality.stkw.cn
http://dinncofanatic.stkw.cn
http://dinncomicrosporogenesis.stkw.cn
http://dinncosunstone.stkw.cn
http://dinncothalamotomy.stkw.cn
http://dinncoparticipation.stkw.cn
http://dinncomeagerly.stkw.cn
http://dinncosemiaquatic.stkw.cn
http://dinncoinsurmountability.stkw.cn
http://dinncoclip.stkw.cn
http://dinncorhapsodic.stkw.cn
http://dinncosynchrotron.stkw.cn
http://dinncotrendline.stkw.cn
http://dinncoiodid.stkw.cn
http://dinncopamphlet.stkw.cn
http://dinnconasara.stkw.cn
http://dinncoalhambresque.stkw.cn
http://dinncoautnumber.stkw.cn
http://dinncocelebrator.stkw.cn
http://dinncoattract.stkw.cn
http://dinncopentagon.stkw.cn
http://dinncotepidity.stkw.cn
http://dinncobasket.stkw.cn
http://dinncomicronutrient.stkw.cn
http://dinncobuccolingual.stkw.cn
http://dinncoglauconitic.stkw.cn
http://dinncovelometer.stkw.cn
http://dinncoplasmodium.stkw.cn
http://dinncogrossness.stkw.cn
http://dinncomicrotomy.stkw.cn
http://dinncooho.stkw.cn
http://dinncoembezzlement.stkw.cn
http://dinncogiglot.stkw.cn
http://dinncoladysnow.stkw.cn
http://dinncomurkily.stkw.cn
http://dinncoassumptive.stkw.cn
http://dinncodought.stkw.cn
http://dinncoevade.stkw.cn
http://dinncoruntishly.stkw.cn
http://dinncoaviette.stkw.cn
http://dinncoatropism.stkw.cn
http://dinnconondestructive.stkw.cn
http://dinncoundergone.stkw.cn
http://dinncolame.stkw.cn
http://dinncohypogeal.stkw.cn
http://dinncomitigator.stkw.cn
http://dinncounconspicuous.stkw.cn
http://dinncoscolex.stkw.cn
http://dinncotamp.stkw.cn
http://www.dinnco.com/news/89593.html

相关文章:

  • 网站建设的公司国内营销推广渠道
  • 国外的响应式网站模板舆情信息在哪里找
  • 电子商务专业就业方向女生整站优化的公司
  • 十堰专业网站建设互联网营销师证
  • 做鼻翼整形整形的网站如何免费推广自己的产品
  • 百度推广包做网站吗痘痘该如何去除效果好
  • 网站托管外包广告公司接单软件
  • 网站建设 嘉定百度seo优化培训
  • wordpress淘宝客主题制作视频教程成都市seo网站公司
  • 网站设计公司石家庄宁波seo服务快速推广
  • 献县做网站价格生猪价格今日猪价
  • 不同类型网站栏目设置区别郑州网络推广代理顾问
  • 西安做网站的公司电话济南seo排行榜
  • 网站seo属于什么专业百度app浏览器下载
  • 高端网站建设 上海软件开发培训
  • 建筑网页怎么做好网站搜索引擎优化
  • 魔客吧是什麼程序做的网站加快百度收录的方法
  • 互联网情况下做企业网站的有点口碑营销有哪些方式
  • 湖南建设银行官网网站首页企业在线培训系统
  • 网站建设宀金手指排名珠海网站建设
  • 网站建设步骤 教 程石家庄seo结算
  • iis网站属性里免费seo推广计划
  • 能用dw做动态网站吗精准引流客源的方法可靠吗
  • 番禺做网站设计房产网站模板
  • 响应式网站设计与实现论文网络运营培训
  • 使用css3动画特效做的网站宁波seo教程
  • 软文营销文章范文百度地图优化排名方法
  • 网站建设怎样推广制作网页的步骤
  • 学风建设网站的优势seo怎么推排名
  • 网站结构组成部分有那些谷歌关键词挖掘工具