国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

這篇具有很好參考價(jià)值的文章主要介紹了k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

K8s部署:2023年K8s發(fā)布第一個(gè)大版本K8s1.27變動(dòng)?運(yùn)行時(shí)Containerd一起來(lái)安裝看看!

一、主機(jī)準(zhǔn)備

1.1 Kubernetes 1.27版本集群部署環(huán)境準(zhǔn)備

1.1.1 主機(jī)操作系統(tǒng)說(shuō)明

序號(hào) 操作系統(tǒng)及版本 備注
1 CentOS7u9

1.1.2 主機(jī)硬件配置說(shuō)明

需求 CPU 內(nèi)存 硬盤(pán) 角色 主機(jī)名
8C 8G 1024GB master k8s-master01
8C 16G 1024GB worker(node) k8s-worker01
8C 16G 1024GB worker(node) k8s-worker02

1.1.3 主機(jī)配置

1.1.3.1 主機(jī)名配置

由于本次使用3臺(tái)主機(jī)完成kubernetes集群部署,其中1臺(tái)為master節(jié)點(diǎn),名稱(chēng)為k8s-master01;其中2臺(tái)為worker節(jié)點(diǎn),名稱(chēng)分別為:k8s-worker01及k8s-worker02

master節(jié)點(diǎn)
# hostnamectl set-hostname k8s-master01
worker01節(jié)點(diǎn)
# hostnamectl set-hostname k8s-worker01
worker02節(jié)點(diǎn)
# hostnamectl set-hostname k8s-worker02
1.1.3.2 主機(jī)IP地址配置
k8s-master節(jié)點(diǎn)IP地址為:192.168.10.160/24
# vim /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
DEVICE="ens33"
ONBOOT="yes"
IPADDR="192.168.10.160"
PREFIX="24"
GATEWAY="192.168.10.2"
DNS1="119.29.29.29"
k8s-worker1節(jié)點(diǎn)IP地址為:192.168.10.161/24
# vim /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
DEVICE="ens33"
ONBOOT="yes"
IPADDR="192.168.10.161"
PREFIX="24"
GATEWAY="192.168.10.2"
DNS1="119.29.29.29"
k8s-worker2節(jié)點(diǎn)IP地址為:192.168.10.162/24
# vim /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
DEVICE="ens33"
ONBOOT="yes"
IPADDR="192.168.10.162"
PREFIX="24"
GATEWAY="192.168.10.2"
DNS1="119.29.29.29"
1.1.3.3 主機(jī)名與IP地址解析

所有集群主機(jī)均需要進(jìn)行配置。

# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.10.160 k8s-master01
192.168.10.161 k8s-worker01
192.168.10.162 k8s-worker02
1.1.3.4 防火墻配置

所有主機(jī)均需要操作。

關(guān)閉現(xiàn)有防火墻firewalld
# systemctl disable firewalld
# systemctl stop firewalld
# firewall-cmd --state
not running
1.1.3.5 SELINUX配置

所有主機(jī)均需要操作。修改SELinux配置需要重啟操作系統(tǒng)。

# sed -ri 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
1.1.3.6 時(shí)間同步配置

所有主機(jī)均需要操作。最小化安裝系統(tǒng)需要安裝ntpdate軟件。

# crontab -l
0 */1 * * * /usr/sbin/ntpdate time1.aliyun.com
1.1.3.7 升級(jí)操作系統(tǒng)內(nèi)核

所有主機(jī)均需要操作。

導(dǎo)入elrepo gpg key
# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
安裝elrepo YUM源倉(cāng)庫(kù)
# yum -y install https://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
安裝kernel-ml版本,ml為長(zhǎng)期穩(wěn)定版本,lt為長(zhǎng)期維護(hù)版本
# yum --enablerepo="elrepo-kernel" -y install kernel-lt.x86_64
設(shè)置grub2默認(rèn)引導(dǎo)為0
# grub2-set-default 0
重新生成grub2引導(dǎo)文件
# grub2-mkconfig -o /boot/grub2/grub.cfg
更新后,需要重啟,使用升級(jí)的內(nèi)核生效。
# reboot
重啟后,需要驗(yàn)證內(nèi)核是否為更新對(duì)應(yīng)的版本
# uname -r
1.1.3.8 配置內(nèi)核轉(zhuǎn)發(fā)及網(wǎng)橋過(guò)濾

所有主機(jī)均需要操作。

添加網(wǎng)橋過(guò)濾及內(nèi)核轉(zhuǎn)發(fā)配置文件
# 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
vm.swappiness = 0
EOF
加載br_netfilter模塊
# modprobe br_netfilter
查看是否加載
# lsmod | grep br_netfilter
br_netfilter           22256  0
bridge                151336  1 br_netfilter
1.1.3.9 安裝ipset及ipvsadm

所有主機(jī)均需要操作。

安裝ipset及ipvsadm
# yum -y install ipset ipvsadm
配置ipvsadm模塊加載方式
添加需要加載的模塊
# cat > /etc/sysconfig/modules/ipvs.modules <<EOF
#!/bin/bash
modprobe -- ip_vs
modprobe -- ip_vs_rr
modprobe -- ip_vs_wrr
modprobe -- ip_vs_sh
modprobe -- nf_conntrack
EOF
授權(quán)、運(yùn)行、檢查是否加載
# chmod 755 /etc/sysconfig/modules/ipvs.modules && bash /etc/sysconfig/modules/ipvs.modules && lsmod | grep -e ip_vs -e nf_conntrack
1.1.3.10 關(guān)閉SWAP分區(qū)

修改完成后需要重啟操作系統(tǒng),如不重啟,可臨時(shí)關(guān)閉,命令為swapoff -a

永遠(yuǎn)關(guān)閉swap分區(qū),需要重啟操作系統(tǒng)
# cat /etc/fstab
......

# /dev/mapper/centos-swap swap                    swap    defaults        0 0

在上一行中行首添加#

二、容器運(yùn)行時(shí) Containerd準(zhǔn)備

2.1 Containerd準(zhǔn)備

2.1.1 Containerd部署文件獲取

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

# wget https://github.com/containerd/containerd/releases/download/v1.7.0/cri-containerd-cni-1.7.0-linux-amd64.tar.gz
# tar xf cri-containerd-cni-1.7.0-linux-amd64.tar.gz  -C /

2.1.2 Containerd配置文件生成并修改

# mkdir /etc/containerd
# containerd config default > /etc/containerd/config.toml
# vim /etc/containerd/config.toml

sandbox_image = "registry.k8s.io/pause:3.9" 由3.8修改為3.9

2.1.3 Containerd啟動(dòng)及開(kāi)機(jī)自啟動(dòng)

# systemctl enable --now containerd
驗(yàn)證其版本
# containerd --version

2.2 runc準(zhǔn)備

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

2.2.1 libseccomp準(zhǔn)備

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

# wget https://github.com/opencontainers/runc/releases/download/v1.1.5/libseccomp-2.5.4.tar.gz
# tar xf libseccomp-2.5.4.tar.gz
# cd libseccomp-2.5.4/
# yum install gperf -y
# ./configure
# make && make install
# find / -name "libseccomp.so"

2.2.2 runc安裝

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

# wget https://github.com/opencontainers/runc/releases/download/v1.1.5/runc.amd64
# chmod +x runc.amd64
查找containerd安裝時(shí)已安裝的runc所在的位置,然后替換
# which runc
替換containerd安裝已安裝的runc
# mv runc.amd64 /usr/local/sbin/runc
執(zhí)行runc命令,如果有命令幫助則為正常
# runc

如果運(yùn)行runc命令時(shí)提示:runc: error while loading shared libraries: libseccomp.so.2: cannot open shared object file: No such file or directory,則表明runc沒(méi)有找到libseccomp,需要檢查libseccomp是否安裝,本次安裝默認(rèn)就可以查詢(xún)到。

三、K8S集群部署

3.1 K8S集群軟件YUM源準(zhǔn)備

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

3.2 K8S集群軟件安裝

3.2.1 集群軟件安裝

所有節(jié)點(diǎn)均可安裝

默認(rèn)安裝
# yum -y install  kubeadm  kubelet kubectl
查看指定版本
# yum list kubeadm.x86_64 --showduplicates | sort -r
# yum list kubelet.x86_64 --showduplicates | sort -r
# yum list kubectl.x86_64 --showduplicates | sort -r
安裝指定版本
# yum -y install  kubeadm-1.27.X-0  kubelet-1.27.X-0 kubectl-1.27.X-0

3.2.2 配置kubelet

為了實(shí)現(xiàn)docker使用的cgroupdriver與kubelet使用的cgroup的一致性,建議修改如下文件內(nèi)容。

# vim /etc/sysconfig/kubelet
KUBELET_EXTRA_ARGS="--cgroup-driver=systemd"
設(shè)置kubelet為開(kāi)機(jī)自啟動(dòng)即可,由于沒(méi)有生成配置文件,集群初始化后自動(dòng)啟動(dòng)
# systemctl enable kubelet

3.3 K8S集群初始化

[root@k8s-master01 ~]# kubeadm init --kubernetes-version=v1.27.0 --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=192.168.10.160  --cri-socket unix:///var/run/containerd/containerd.sock
[init] Using Kubernetes version: v1.27.0
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [k8s-master01 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.10.160]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [k8s-master01 localhost] and IPs [192.168.10.160 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [k8s-master01 localhost] and IPs [192.168.10.160 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Starting the kubelet
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[apiclient] All control plane components are healthy after 20.502191 seconds
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[kubelet] Creating a ConfigMap "kubelet-config" in namespace kube-system with the configuration for the kubelets in the cluster
[upload-certs] Skipping phase. Please see --upload-certs
[mark-control-plane] Marking the node k8s-master01 as control-plane by adding the labels: [node-role.kubernetes.io/control-plane node.kubernetes.io/exclude-from-external-load-balancers]
[mark-control-plane] Marking the node k8s-master01 as control-plane by adding the taints [node-role.kubernetes.io/control-plane:NoSchedule]
[bootstrap-token] Using token: hd74hg.r8l1pe4tivwyjz73
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
[bootstrap-token] Configured RBAC rules to allow Node Bootstrap tokens to get nodes
[bootstrap-token] Configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstrap-token] Configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstrap-token] Configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
[bootstrap-token] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[kubelet-finalize] Updating "/etc/kubernetes/kubelet.conf" to point to a rotatable kubelet client certificate and key
[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxy

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

Alternatively, if you are the root user, you can run:

  export KUBECONFIG=/etc/kubernetes/admin.conf

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 192.168.10.160:6443 --token hd74hg.r8l1pe4tivwyjz73 \
        --discovery-token-ca-cert-hash sha256:29a00daed8d96dfa8e913ab4c0a8c4037f1c253a20742ca8913932dd7c8b3bd1

3.4 工作節(jié)點(diǎn)加入集群

[root@k8s-worker01 ~]# kubeadm join 192.168.10.160:6443 --token hd74hg.r8l1pe4tivwyjz73 \
>         --discovery-token-ca-cert-hash sha256:29a00daed8d96dfa8e913ab4c0a8c4037f1c253a20742ca8913932dd7c8b3bd1 --cri-socket unix:///var/run/containerd/containerd.sock
[root@k8s-worker02 ~]# kubeadm join 192.168.10.160:6443 --token hd74hg.r8l1pe4tivwyjz73 \
>         --discovery-token-ca-cert-hash sha256:29a00daed8d96dfa8e913ab4c0a8c4037f1c253a20742ca8913932dd7c8b3bd1 --cri-socket unix:///var/run/containerd/containerd.sock

3.5 驗(yàn)證K8S集群節(jié)點(diǎn)是否可用

[root@k8s-master01 ~]# kubectl get nodes
NAME           STATUS   ROLES           AGE   VERSION
k8s-master01   Ready    control-plane   15m   v1.27.0
k8s-worker01   Ready    <none>          13m   v1.27.0
k8s-worker02   Ready    <none>          13m   v1.27.0

四、網(wǎng)絡(luò)插件calico部署

calico訪問(wèn)鏈接:https://projectcalico.docs.tigera.io/about/about-calico

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd

# kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.1/manifests/tigera-operator.yaml
# wget https://raw.githubusercontent.com/projectcalico/calico/v3.25.1/manifests/custom-resources.yaml
# vim custom-resources.yaml


# cat custom-resources.yaml


# This section includes base Calico installation configuration.
# For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.Installation
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
  name: default
spec:
  # Configures Calico networking.
  calicoNetwork:
    # Note: The ipPools section cannot be modified post-install.
    ipPools:
    - blockSize: 26
      cidr: 10.244.0.0/16 修改此行內(nèi)容為初始化時(shí)定義的pod network cidr
      encapsulation: VXLANCrossSubnet
      natOutgoing: Enabled
      nodeSelector: all()

---

# This section configures the Calico API server.
# For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.APIServer
apiVersion: operator.tigera.io/v1
kind: APIServer
metadata:
  name: default
spec: {}
# kubectl create -f custom-resources.yaml

installation.operator.tigera.io/default created
apiserver.operator.tigera.io/default created
[root@k8s-master01 ~]# kubectl get pods -n calico-system
NAME                                       READY   STATUS    RESTARTS   AGE
calico-kube-controllers-6bb86c78b4-cnr9l   1/1     Running   0          2m26s
calico-node-86cs9                          1/1     Running   0          2m26s
calico-node-gjgcc                          1/1     Running   0          2m26s
calico-node-hlr69                          1/1     Running   0          2m26s
calico-typha-6f877c9d8f-8f5fb              1/1     Running   0          2m25s
calico-typha-6f877c9d8f-spxqf              1/1     Running   0          2m26s
csi-node-driver-9b8nd                      2/2     Running   0          2m26s
csi-node-driver-rg6dc                      2/2     Running   0          2m26s
csi-node-driver-tf82w                      2/2     Running   0          2m26s

#入學(xué)安裝視頻教學(xué)可以點(diǎn)贊+收藏+私信獲取~文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-437518.html

到了這里,關(guān)于k8s 1.27集群部署 容器運(yùn)行時(shí)為containerd的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • K8s集群1.27最新版二進(jìn)制高可用部署

    K8s集群1.27最新版二進(jìn)制高可用部署

    二進(jìn)制方式安裝Kubernetes高可用集群,雖然安裝過(guò)程較為復(fù)雜,但這也是每個(gè)技術(shù)人員必須要掌握的內(nèi)容。同時(shí),在安裝過(guò)程中,也可以更加深刻地理解每個(gè)組件的工作原理。 一、系統(tǒng)環(huán)境配置 (1)主機(jī)名配置 (2)所有節(jié)點(diǎn)修改yum源 (3)所有節(jié)點(diǎn)安裝常用軟件 ? (4)將master01節(jié)點(diǎn)配

    2024年02月07日
    瀏覽(29)
  • k8s單節(jié)點(diǎn)部署,容器運(yùn)行時(shí)使用containerd

    k8s單節(jié)點(diǎn)部署,容器運(yùn)行時(shí)使用containerd

    環(huán)境 系統(tǒng) : entOS Linux release 7.9.2009 (Core IP:192.168.44.177 硬件要求:控制平面最少需要 2c2g 安裝前環(huán)境準(zhǔn)備 如果是集群部署還需要配置時(shí)間同步 關(guān)閉防火墻 關(guān)閉selinux 關(guān)閉swap分區(qū) 如果沒(méi)有開(kāi)啟swap分區(qū)可以跳過(guò)這步 刪除掉 /etc/fstab 有關(guān)swap分區(qū)的信息 設(shè)置主機(jī)名 開(kāi)始安裝容器

    2024年04月12日
    瀏覽(23)
  • 安裝 k8s集群的問(wèn)題:默認(rèn)容器運(yùn)行時(shí)從 Docker 改為 Containerd

    安裝 k8s集群的問(wèn)題:默認(rèn)容器運(yùn)行時(shí)從 Docker 改為 Containerd

    ??The Begin??點(diǎn)點(diǎn)關(guān)注,收藏不迷路?? 從 Kuberetes 1.20 版本開(kāi)始,Kuberetes官方 已經(jīng)將默認(rèn)的容器運(yùn)行時(shí)從Docker改為Containerd。 因此,從 Kubernetes 1.20 開(kāi)始,Kuberetes官方將支持使用 Docker和Containerd 作為容器運(yùn)時(shí),也意味著Kubemetes從Docker的依賴(lài)中解耦了出來(lái)。 在 Kubernetes1.24 及之后

    2024年04月14日
    瀏覽(27)
  • K8S 1.27 動(dòng)態(tài)調(diào)整容器CPU和內(nèi)存資源限制,無(wú)需重啟應(yīng)用程序

    如果您在部署Pod時(shí)指定了 CPU 和內(nèi)存資源,更改資源大小需要重新啟動(dòng) Pod。到目前為止,重啟對(duì)于正在運(yùn)行工的作負(fù)載是一種破壞性操作。 Kubernetes 1.27 中的 alpha 功能發(fā)布。其中一項(xiàng)能夠自動(dòng)調(diào)整 Pod 的 CPU 和內(nèi)存限制的大小,只需修補(bǔ)正在運(yùn)行的 Pod 定義即可更改它們,而無(wú)

    2024年02月07日
    瀏覽(29)
  • 記K8S集群工作節(jié)點(diǎn),AnolisOS 8.6部署顯卡驅(qū)動(dòng)集成Containerd運(yùn)行時(shí)

    #安裝編譯環(huán)境 點(diǎn)擊 直達(dá)連接 nvidia高級(jí)搜索下載歷史版本驅(qū)動(dòng)程序(下載歷史版本驅(qū)動(dòng)) 安裝顯卡驅(qū)動(dòng) 執(zhí)行nvidia-smi #安裝源 #安裝容器運(yùn)行時(shí)

    2024年02月12日
    瀏覽(44)
  • 【Kubernetes部署篇】Ansible自動(dòng)化工具離線部署K8s 1.27版本

    【Kubernetes部署篇】Ansible自動(dòng)化工具離線部署K8s 1.27版本

    一、前提須知 采用kubeadm方式,目前只支持 單Master,多Node部署架構(gòu) 需要主機(jī)網(wǎng)絡(luò)互通,沒(méi)有網(wǎng)絡(luò)限制 需要使用root用戶權(quán)限進(jìn)行部署 二、使用Ansible部署K8S集群步驟 第一步:獲取離線安裝包 百度網(wǎng)盤(pán)獲取 MD5:97d1f48bff3a345429b551b877c7c53d 第二步:安裝ansible命令,壓縮包中提供

    2024年02月14日
    瀏覽(25)
  • kubeasz一鍵部署harbor、containerd運(yùn)行時(shí)、高可用k8s(1.26.x)集群-Day 02

    kubeasz一鍵部署harbor、containerd運(yùn)行時(shí)、高可用k8s(1.26.x)集群-Day 02

    如果自建機(jī)房,請(qǐng)把核心組件的機(jī)器分布到不同機(jī)柜中。 服務(wù)器可以是私有云的虛擬機(jī)或物理機(jī),也可以是公有云環(huán)境的虛擬機(jī)環(huán)境,如果是公司托管的IDC環(huán)境,可以直 接將harbor和node節(jié)點(diǎn)部署在物理機(jī)環(huán)境,master節(jié)點(diǎn)、etcd、負(fù)載均衡等可以是虛擬機(jī)。 下面是我的學(xué)習(xí)環(huán)境

    2024年02月09日
    瀏覽(35)
  • 云原生Kubernetes:K8S集群實(shí)現(xiàn)容器運(yùn)行時(shí)遷移(docker → containerd) 與 版本升級(jí)(v1.23.14 → v1.24.1)

    云原生Kubernetes:K8S集群實(shí)現(xiàn)容器運(yùn)行時(shí)遷移(docker → containerd) 與 版本升級(jí)(v1.23.14 → v1.24.1)

    目錄 一、理論 1.K8S集群升級(jí) 2.環(huán)境 3.升級(jí)策略 4.master1節(jié)點(diǎn)遷移容器運(yùn)行時(shí)(docker → containerd)? 5.master2節(jié)點(diǎn)遷移容器運(yùn)行時(shí)(docker → containerd)? 6.node1節(jié)點(diǎn)容器運(yùn)行時(shí)遷移(docker → containerd)? 7.升級(jí)集群計(jì)劃(v1.23.14 →?v1.24.1) 8.升級(jí)master1節(jié)點(diǎn)版本(v1.24.1) 9.升級(jí)master2節(jié)點(diǎn)版本

    2024年02月03日
    瀏覽(38)
  • 【C站首發(fā)】全網(wǎng)最新Kubernetes(K8s)1.28版本探秘及部署 基于Containerd容器運(yùn)行時(shí)(100年證書(shū)kubeadm)

    【C站首發(fā)】全網(wǎng)最新Kubernetes(K8s)1.28版本探秘及部署 基于Containerd容器運(yùn)行時(shí)(100年證書(shū)kubeadm)

    序號(hào) 操作系統(tǒng)及版本 備注 1 CentOS7u9 需求 CPU 內(nèi)存 硬盤(pán) 角色 主機(jī)名 值 8C 8G 1024GB master k8s-master01 值 8C 16G 1024GB worker(node) k8s-worker01 值 8C 16G 1024GB worker(node) k8s-worker02 1.3.1 主機(jī)名配置 由于本次使用3臺(tái)主機(jī)完成kubernetes集群部署,其中1臺(tái)為master節(jié)點(diǎn),名稱(chēng)為k8s-master01;其中2臺(tái)為wor

    2024年02月08日
    瀏覽(40)
  • K8S容器運(yùn)行時(shí)從Docker切換為Containerd

    K8S從1.24版本起不再支持docker容器引擎,可選的替代品有 containerd 、 cri-o 、 podman 。下面演示將單個(gè)node節(jié)點(diǎn)的容器引擎從docker切換為containerd的過(guò)程。 檢查是否已經(jīng)加載內(nèi)核模塊 overlay 和 br_netfilter 。 如果沒(méi)有,手動(dòng)加載內(nèi)核模塊: 檢查系統(tǒng)內(nèi)核參數(shù): 如果沒(méi)有開(kāi)啟,手動(dòng)調(diào)

    2024年02月09日
    瀏覽(36)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包