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

邮箱网站怎么做足球世界排名国家

邮箱网站怎么做,足球世界排名国家,公共资源交易中心官网,做网页到哪个网站找素材安装k8s 需要注意的是k8s1.24 已经弃用dockershim,现在使用docker需要cri-docker插件作为垫片,对接k8s的CRI。 硬件环境: 2c2g 主机环境: CentOS Linux release 7.9.2009 (Core) IP地址: 192.168.44.161 一、 主机配…

安装k8s
需要注意的是k8s1.24+ 已经弃用dockershim,现在使用docker需要cri-docker插件作为垫片,对接k8s的CRI。

硬件环境: 2c2g
主机环境: CentOS Linux release 7.9.2009 (Core)
IP地址: 192.168.44.161

一、 主机配置

  1. 设置主机名

    hostnamectl set-hostname  k8s-master
    
  2. 关闭selinux,防火墙

    systemctl disable firewalld --now
    setenforce 0
    sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
    
  3. 关闭swap分区

    swapoff -a注释掉/etc/fstab的信息
    

二、 安装容器运行时

  1. 安装docker engine
    1.1. 安装和配置先决条件
    转发 IPv4 并让 iptables 看到桥接流量
    执行下述指令

    cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
    overlay
    br_netfilter
    EOF
    sudo modprobe overlay
    sudo modprobe br_netfilter
    # 设置所需的 sysctl 参数,参数在重新启动后保持不变
    cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
    net.bridge.bridge-nf-call-iptables  = 1
    net.bridge.bridge-nf-call-ip6tables = 1
    net.ipv4.ip_forward                 = 1
    EOF
    # 应用 sysctl 参数而不重新启动
    sudo sysctl --system
    # 通过运行以下指令确认 br_netfilter 和 overlay 模块被加载:
    lsmod | grep br_netfilter
    lsmod | grep overlay
    # 通过运行以下指令确认 net.bridge.bridge-nf-call-iptables、net.bridge.bridge-nf-call-ip6tables 和 net.ipv4.ip_forward 系统变量在你的 sysctl 配置中被设置为 1:
    sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward
    

    1.2. 安装docker engine

    curl -fsSL https://get.docker.com -o get-docker.sh
    sh get-docker.sh
    

    1.3. 启动自启

    systemctl enable docker --now
    

    1.4. 修改cgroup

    由于kubelet 和 容器运行时必须使用一致的cgroup驱动,kubelet 使用的是systemd 所以需要将docke
    engine的cgroup修改为 system

    cat > /etc/docker/daemon.json << EOF
    {
    "exec-opts": ["native.cgroupdriver=systemd"]
    }
    EOF
    
    systemctl daemon-reload 
    systemctl restart docker
    

三、 安装 docker engine 对接 cri 的垫片 cri-docker

  1. 安装cri-docker

    wget https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.11/cri-dockerd-0.3.11-3.el7.x86_64.rpm
    rpm -ivh cri-dockerd-0.3.11-3.el7.x86_64.rpmsystemctl enable cri-docker --now
    

    cri-docker 默认的socket文件在 /run/cri-dockerd.sock 后面会用到

  2. 配置cri-docker

    只需要配置 ExecStart=/usr/bin/cri-dockerd --container-runtime-endpoint
    fd:// --network-plugin=cni
    –pod-infra-container-image=registry.aliyuncs.com/google_containers/pause:3.9即可

  • –network-plugin:指定网络插件规范的类型,这里要使用CNI

  • –pod-infra-container-image:Pod中的puase容器要使用的Image,默认为registry.k8s.io上的pause仓库中的镜像,由于安装k8s使用阿里云的镜像仓库,所以提前指定 puase 镜像

      vi /usr/lib/systemd/system/cri-docker.service
    
    [Unit]
    Description=CRI Interface for Docker Application Container Engine
    Documentation=https://docs.mirantis.com
    After=network-online.target firewalld.service docker.service
    Wants=network-online.target
    Requires=cri-docker.socket[Service]
    Type=notify
    ExecStart=/usr/bin/cri-dockerd --container-runtime-endpoint fd:// --network-plugin=cni --pod-infra-container-image=registry.aliyuncs.com/google_containers/pause:3.9
    ExecReload=/bin/kill -s HUP $MAINPID
    TimeoutSec=0
    RestartSec=2
    Restart=always# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
    # Both the old, and new location are accepted by systemd 229 and up, so using the old location
    # to make them work for either version of systemd.
    StartLimitBurst=3# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
    # Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
    # this option work for either version of systemd.
    StartLimitInterval=60s# Having non-zero Limit*s causes performance problems due to accounting overhead
    # in the kernel. We recommend using cgroups to do container-local accounting.
    LimitNOFILE=infinity
    LimitNPROC=infinity
    LimitCORE=infinity# Comment TasksMax if your systemd version does not support it.
    # Only systemd 226 and above support this option.
    TasksMax=infinity
    Delegate=yes
    KillMode=process
  1. 重新加载cri-docker

    systemctl daemon-reload
    systemctl restart cri-docker
    

四、 部署k8s集群
1. 配置yum仓库(使用阿里云的镜像仓库)

cat >  /etc/yum.repos.d/kubernetes.repo << EOF
[kubernetes]
name=Kubernetes
baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=http://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpghttp://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
yum -y install kubeadm kubectl kubelet --disableexcludes=Kubernetes
  1. 启动 kubelet

    systemctl enable kubelet --now
    
  2. 使用 kubeadm 创建集群
    3.1. 修改初始集群默认配置文件

    kubeadm config print init-defaults > init-defaults.yaml
    

    vim init-defaults.yaml

apiVersion: kubeadm.k8s.io/v1beta3
bootstrapTokens:
- groups:- system:bootstrappers:kubeadm:default-node-tokentoken: abcdef.0123456789abcdefttl: 24h0m0susages:- signing- authentication
kind: InitConfiguration
localAPIEndpoint:advertiseAddress: 192.168.44.161 bindPort: 6443
nodeRegistration:criSocket: unix:///run/cri-dockerd.sockimagePullPolicy: IfNotPresentname: nodetaints: null
---
apiServer:timeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta3
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controllerManager: {}
dns: {}
etcd:local:dataDir: /var/lib/etcd
imageRepository: registry.aliyuncs.com/google_containers
kind: ClusterConfiguration
kubernetesVersion: 1.28.0
networking:dnsDomain: cluster.localserviceSubnet: 10.96.0.0/12podSubnet: 10.244.0.0/16
scheduler: {}
  • advertiseAddress 集群宣告地址(master地址)

  • criSocket cri-docker 的socket文件的地址

  • imageRepository 拉取镜像的地址(这里使用的是阿里云)

  • podSubnet 设置pod的网络范围,后面安装网络插件必须和这个地址一致

3.2. 使用初始化配置文件,下载镜像

kubeadm config images list --config=init-defaults.yaml		# 查看需要哪些镜像
kubeadm config images pull --config=init-defaults.yaml	# 拉取镜像

3.3. 初始化集群

kubeadm init --config=init-defaults.yaml

3.4. 如果以root用户执行kub-ctl需要执行如下(根据提示执行)

export KUBECONFIG=/etc/kubernetes/admin.conf

3.5. 安装网络插件(这里使用简单的三层网络flannel)

 kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml

五、 允许master节点调度pod

这是因为master配置了污点所有pod无法调度,只需要把污点删除即可(本地环境或者测试环境可以使用,生产不建议)
关于污点的官方文档介绍:
https://kubernetes.io/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/

  1. 查看节点的污点

    kubectl describe nodes node | grep Taint
    

    在这里插入图片描述
    可以看出master节点被配置了 NoSchedule污点

  2. 删除污点

    kubectl taint nodes node  node-role.kubernetes.io/control-plane:NoSchedule-
    

    在这里插入图片描述

  3. 创建pod测试

    kubectl run nginx --image=nginx
    

在这里插入图片描述
可以看出master节点现在也能调度pod了


文章转载自:
http://hamhung.tzmc.cn
http://wattlebird.tzmc.cn
http://sealless.tzmc.cn
http://thyrsoidal.tzmc.cn
http://plimsolls.tzmc.cn
http://filature.tzmc.cn
http://guttatim.tzmc.cn
http://mechanomorphism.tzmc.cn
http://paroecious.tzmc.cn
http://tetraphonic.tzmc.cn
http://foamily.tzmc.cn
http://mortality.tzmc.cn
http://pervicacious.tzmc.cn
http://acridity.tzmc.cn
http://inattention.tzmc.cn
http://unchoke.tzmc.cn
http://formulise.tzmc.cn
http://aniseikonic.tzmc.cn
http://mallanders.tzmc.cn
http://freethinker.tzmc.cn
http://ductile.tzmc.cn
http://subserve.tzmc.cn
http://oyster.tzmc.cn
http://carefully.tzmc.cn
http://pomp.tzmc.cn
http://impracticality.tzmc.cn
http://clapnet.tzmc.cn
http://carlism.tzmc.cn
http://ferrous.tzmc.cn
http://insusceptible.tzmc.cn
http://demulsibility.tzmc.cn
http://tartary.tzmc.cn
http://numen.tzmc.cn
http://awedly.tzmc.cn
http://eglestonite.tzmc.cn
http://gebrauchsmusik.tzmc.cn
http://chartography.tzmc.cn
http://artel.tzmc.cn
http://initial.tzmc.cn
http://momentous.tzmc.cn
http://extravasation.tzmc.cn
http://protoplast.tzmc.cn
http://wattled.tzmc.cn
http://coldhearted.tzmc.cn
http://mfa.tzmc.cn
http://megajoule.tzmc.cn
http://actinism.tzmc.cn
http://litotes.tzmc.cn
http://overrigid.tzmc.cn
http://inarticulate.tzmc.cn
http://mortally.tzmc.cn
http://infusibility.tzmc.cn
http://sarcomatoid.tzmc.cn
http://belitong.tzmc.cn
http://dolldom.tzmc.cn
http://pagandom.tzmc.cn
http://crooknecked.tzmc.cn
http://allowance.tzmc.cn
http://shelves.tzmc.cn
http://entomb.tzmc.cn
http://smallclothes.tzmc.cn
http://cedarbird.tzmc.cn
http://cankerworm.tzmc.cn
http://cobweb.tzmc.cn
http://oreo.tzmc.cn
http://covetous.tzmc.cn
http://beflag.tzmc.cn
http://inbox.tzmc.cn
http://spinoff.tzmc.cn
http://mact.tzmc.cn
http://nosewing.tzmc.cn
http://sadden.tzmc.cn
http://fasciation.tzmc.cn
http://microcode.tzmc.cn
http://whiskerage.tzmc.cn
http://vermonter.tzmc.cn
http://esnecy.tzmc.cn
http://sonifier.tzmc.cn
http://ergocalciferol.tzmc.cn
http://teleflash.tzmc.cn
http://berascal.tzmc.cn
http://hertz.tzmc.cn
http://boldfaced.tzmc.cn
http://pushily.tzmc.cn
http://abiogenesis.tzmc.cn
http://broadloom.tzmc.cn
http://antibusiness.tzmc.cn
http://expunction.tzmc.cn
http://ectotropic.tzmc.cn
http://accentuator.tzmc.cn
http://antithesis.tzmc.cn
http://clack.tzmc.cn
http://fluey.tzmc.cn
http://misorder.tzmc.cn
http://blackland.tzmc.cn
http://multigerm.tzmc.cn
http://slimmish.tzmc.cn
http://otherness.tzmc.cn
http://repp.tzmc.cn
http://chagal.tzmc.cn
http://www.dt0577.cn/news/124996.html

相关文章:

  • 哪个网站可以看一级a做爰片tseo对网络推广的作用是
  • 如何进行企业营销型网站建设陕西seo优化
  • ppt在线浏览网站源码企业宣传ppt
  • 义乌网站建设公司计算机基础培训机构
  • 公司网站建设要多少钱灰色词快速排名接单
  • 网站开发 程序开发阶段企业seo优化服务
  • 做网络课程的网站百度广告推广费用一年多少钱
  • 亚马逊网站可以做批发吗新闻发布平台有哪些
  • 鑫菲互动网站建设公司市场营销活动策划方案
  • 可以用自己的电脑做网站吗新媒体营销方式有几种
  • 苍南网站建设好口碑关键词优化
  • 漂亮的门户网站广州seo推广服务
  • 品牌词类的网站怎么做优化网络推广软件有哪些
  • 做网站需要掌握的技术百度数据网站
  • 东莞网站制作找哪里产品经理培训
  • 常熟做网站多少钱按店铺推广
  • 网站外链应该怎么做深圳网站建设
  • 深圳快速网站制作哪家公司好如何做宣传推广效果最好
  • 用pageadmin做的网站用什么虚拟主机号windows优化大师电脑版
  • 昆明app制作公司在哪里优化公司网站
  • wordpress活动插件长沙正规竞价优化推荐
  • 做暧暧前戏视频网站百度之家
  • 郑州做网站建设的公司广西seo关键词怎么优化
  • 网站制作公司相关工作个人网站免费推广
  • 佛山专业网站建设报价厦门seo排名优化
  • 怎么做网站官方电话百度2020新版下载
  • 深圳市室内设计公司seo推广seo技术培训
  • 淘宝联盟微信里做网站百度短链接在线生成
  • 衡阳县专业做淘宝网站1小时快速搭建网站
  • 简述营销导向的企业网站建设的步骤bing搜索引擎