RHEL 8.6 Kubespray 1.23.1 install kubernetes v1.27.7

文章目录

    • 1. 预备条件
    • 配置网卡
    • download01 节点安装 nerdctl
    • 3. download01 节点 介质下载
    • 4. bastion01节点配置 yum 源
    • 5. bastion01 离线安装 nerdctl
    • 安装l insecure registry
    • 配置镜像入库
    • 执行 set-all.sh
    • 7. bastion01 配置互信
    • 8. 启动容器部署环境
    • 9. 部署前准备
      • 9.1 配置 `extract-kubespray.sh`
      • 9.2 编写 inventory.ini
      • 9.3 编写 offline.yml
      • 9.4 配置 containerd.yml
      • 9.5 配置 nerdctl
      • 9.6 配置 nf_conntrack
    • 10. 部署 offline repo
    • 开始部署

1. 预备条件

9 个节点:

角色ipcpumemdiskioskernel
download10.168.2.10、10.90.0.1048G100Grhel 8.74.18+
bastion0110.90.0.1148G100Grhel 8.74.18+
kube-master0110.90.0.1248G100Grhel 8.74.18+
kube-node0110.90.0.1348G100Grhel 8.74.18+
kube-node0210.90.0.1448G100Grhel 8.74.18+
kube-node0310.90.0.1548G100Grhel 8.74.18+

配置网卡

download01

cat /etc/sysconfig/network-scripts/ifcfg-ens192 
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=eui64
NAME=ens192
DEVICE=ens192
ONBOOT=yes
IPADDR=10.168.2.10
PREFIX=16
GATEWAY=10.168.1.1
DNS1=8.8.8.8[root@download ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens224 
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=eui64
NAME=ens224
DEVICE=ens224
ONBOOT=yes
IPADDR=10.90.0.10
PREFIX=16

download01 节点安装 nerdctl

参考:nerdctl install【nerdctl 安装】

配置容器代理

 cat /etc/systemd/system/containerd.service.d/http-proxy.conf 
[Service]
Environment="HTTP_PROXY=http://192.168.21.101:7890" "HTTPS_PROXY=http://192.168.21.101:7890" "NO_PROXY=localhost,127.0.0.0/8,169.0.0.0/8,10.0.0.0/8,192.168.0.0/16,*.coding.net,*.tencentyun.com,*.myqcloud.com"

重启 containerd

systemctl daemon-reload && systemctl restart containerd

3. download01 节点 介质下载

(download)
介质列表:

  • rhel-8.6-x86_64-dvd.iso (用于安装系统和配置yum源)
  • kubespray-offline-2.23.0-0.tar.gz(离线安装 kubernetes)

在下载所有介质之前需除了容器拉取镜像代理,主机也要配置代理否则,是否无法下载成功的。

主机代理:

export https_proxy=http://192.168.21.101:7890
export http_proxy=http://192.168.21.101:7890
export no_proxy=192.168.21.2,10.0.0.0/8,192.168.0.0/16,localhost,127.0.0.0/8,.coding.net,.tencentyun.com,.myqcloud.com

下载最新版本 2.23.0-0: https://github.com/kubespray-offline/kubespray-offline/releases

wget https://github.com/kubespray-offline/kubespray-offline/archive/refs/tags/v2.23.0-0.zipunzip v2.23.0-0.zip

修改默认下载的kubernetes 版本

$ vim config.sh 
#!/bin/bash# Kubespray version to download. Use "master" for latest master branch.
KUBESPRAY_VERSION=${KUBESPRAY_VERSION:-2.23.1}  #修改
#KUBESPRAY_VERSION=${KUBESPRAY_VERSION:-master}# container runtime for preparation node
docker=${docker:-docker}
#docker=${docker:-/usr/local/bin/nerdctl}# Run ansible in container?
ansible_in_container=${ansible_in_container:-false}

安装成功后,下载介质执行:

./download-all.sh

所有工件都存储在./outputs 目录。
此脚本调用以下所有脚本:

  • prepare-pkgs.sh
    Setup python, etc.
  • prepare-py.sh
    Setup python venv, install required python packages.
  • get-kubespray.sh
    Download and extract kubespray, if KUBESPRAY_DIR does not exist.
  • pypi-mirror.sh
    Download PyPI mirror files
  • download-kubespray-files.sh
    Download kubespray offline files (containers, files, etc)
  • download-additional-containers.sh
    Download additional containers.
    You can add any container image repoTag to imagelists/*.txt.
  • create-repo.sh
    Download RPM or DEB repositories.
  • copy-target-scripts.sh
    Copy scripts for target node.

用时 30分钟 下载完成介质。也许一次会下载失败,需要调试反复执行,或者根据环境改动一些内容。

注意:如果你喜欢通过容器部署集群,需要下载 kubespray 镜像,默认 quay.io/kubespray/kubespray:v2.21.0 ,存在一个 pip 包依赖(jmespath 1.0.1),下面镜像已重新编译。

nerdctl pull ghostwritten/kubespray:v2.21-a94b893e2
nerdctl save -o kubespray:v2.21-a94b893e2.tar ghostwritten/kubespray:v2.21-a94b893e2

打包下载的介质:

tar zcvf kubespray-offline-2.23.0-0-kubernetes-v1.27.7-origin.tar.gz kubespray-offline-2.23.0-0

将介质传输至离线的 bastion01

4. bastion01节点配置 yum 源

(bastion01离线状态)

参考:https://www.redhat.com/sysadmin/apache-yum-dnf-repo

mkdir /mnt/cdrom
mount -o loop /root/kubernetes-offline/rhel-8.6-x86_64-dvd.iso /mnt/cdrom

本地配置yum源

cat local.repo 
[BaseOS]
name=BaseOS
baseurl=file:///mnt/cdrom/BaseOS
enable=1
gpgcheck=0[AppStream]
name=AppStream
baseurl=file:///mnt/cdrom/AppStream
enabled=1
gpgcheck=0

测试

$ yum repolist --verbose
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, kpatch, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, subscription-manager, uploadprofile
Updating Subscription Management repositories.
Unable to read consumer identityThis system is not registered with an entitlement server. You can use subscription-manager to register.YUM version: 4.7.0
cachedir: /var/cache/dnf
Last metadata expiration check: 0:35:00 ago on Thu 19 Oct 2023 05:45:22 PM CST.
Repo-id            : AppStream
Repo-name          : AppStream
Repo-revision      : 1656402327
Repo-updated       : Tue 28 Jun 2022 03:45:28 PM CST
Repo-pkgs          : 6,609
Repo-available-pkgs: 5,345
Repo-size          : 8.6 G
Repo-baseurl       : file:///mnt/cdrom/AppStream
Repo-expire        : 172,800 second(s) (last: Thu 19 Oct 2023 05:45:22 PM CST)
Repo-filename      : /etc/yum.repos.d/local.repoRepo-id            : BaseOS
Repo-name          : BaseOS
Repo-revision      : 1656402376
Repo-updated       : Tue 28 Jun 2022 03:46:17 PM CST
Repo-pkgs          : 1,714
Repo-available-pkgs: 1,712
Repo-size          : 1.3 G
Repo-baseurl       : file:///mnt/cdrom/BaseOS
Repo-expire        : 172,800 second(s) (last: Thu 19 Oct 2023 05:45:21 PM CST)
Repo-filename      : /etc/yum.repos.d/local.repo
Total packages: 8,323

yum clean all
yum install ntp

其他节点使用源

$ yum -y install httpd$ vim /etc/httpd/conf/httpd.conflisten 81# vim  /etc/httpd/conf.d/define.conf
<VirtualHost *:81>ServerName  www.XXX-ym.comDocumentRoot /mnt/cdrom
</VirtualHost># vim  /etc/httpd/conf.d/permission.conf
<Directory /mnt/cdrom>Require all granted      
</Directory>$ systemctl  restart  httpd
$ chcon -R --reference=/var/www  /mnt/cdrom  //调整SELinux属性$ systemctl  restart  httpd

远程节点配置yum源

$ cat http_iso.repo 
[BaseOS] 
name=http_iso 
baseurl=http://10.70.0.254/BaseOS
gpgcheck=0 
enabled=1
[AppStream] 
name=http_iso 
baseurl=http://10.70.0.254/AppStream
gpgcheck=0 
enabled=1

5. bastion01 离线安装 nerdctl

打包下载的介质传输到离线环境:

cd ../
tar zcvf kubespray-offline-2.23.0-0-kubernetes-v1.27.7-origin.tar.gz kubespray-offline-2.23.0-0

登陆部署节点(registry01),然后在输出目录中运行以下脚本:

mkdir /root/kubernetes-offline && cd kubespray-offline-2.23.0-0.tar.gz
tar zxvf kubespray-offline-2.23.0-0.tar.gz
cd /root/kubespray-offline-2.23.0-0/outputs && vim offline-install-nerdctl-containerd.sh
#!/bin/bashBASE_DIR="$(dirname "$(readlink -f "${0}")")"
name=`basename $0`tar xvf ${BASE_DIR}/files/containerd-1.7.5-linux-amd64.tar.gz --strip-components=1 -C /usr/local/bin
cp ${BASE_DIR}/files/runc/v1.1.9/runc.amd64 /usr/local/bin/runc
chmod 755 /usr/local/bin/runctar zxvf ${BASE_DIR}/files/nerdctl-1.5.0-linux-amd64.tar.gz -C /tmp/
cp /tmp/nerdctl /usr/local/binsudo mkdir -p \/etc/systemd/system/containerd.service.d \/etc/containerd \/var/lib/containerd \/run/containerd#配置 containerdcat <<EOF> /etc/systemd/system/containerd.service
# Copyright The containerd Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target local-fs.target[Service]
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/containerdType=notify
Delegate=yes
KillMode=process
Restart=always
RestartSec=5
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity
LimitNOFILE=infinity
# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this version.
TasksMax=infinity
OOMScoreAdjust=-999[Install]
WantedBy=multi-user.target
EOFcat <<EOF> /etc/containerd/config.toml
version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0[grpc]address = "/run/containerd/containerd.sock"uid = 0gid = 0[debug]address = "/run/containerd/debug.sock"uid = 0gid = 0level = "info"[metrics]address = ""grpc_histogram = false[cgroup]path = ""[plugins][plugins."io.containerd.grpc.v1.cri".containerd]default_runtime_name = "runc"snapshotter = "overlayfs"[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]runtime_type = "io.containerd.runc.v2"[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]systemdCgroup = true
EOF# restart containerd
sudo systemctl daemon-reload && sudo systemctl enable --now containerd &&  systemctl status  containerd | grep Active#CNI plugins installsudo mkdir -p /opt/cni/bin && tar xvzf  ${BASE_DIR}/files/kubernetes/cni/cni-plugins-linux-amd64-v1.3.0.tgz -C /opt/cni/bin

执行:

sh -x offline-install-nerdctl-containerd.sh

安装l insecure registry

修改 config.sh

$ vim /root/kubespray-offline-2.23.0-0/outputs/config.sh 
#!/bin/bash
KUBESPRAY_VERSION=${KUBESPRAY_VERSION:-2.23.1}  #修改
#KUBESPRAY_VERSION=${KUBESPRAY_VERSION:-master}REGISTRY_PORT=${REGISTRY_PORT:-35000}

确保 /etc/resolv.conf 存在,否则会报错,touch /etc/resolv.conf

载入 registry 镜像

$ nerdctl load -i images/docker.io_library_registry-2.8.2.tar.gz 
unpacking docker.io/library/registry:2.8.2 (sha256:43408412c6b1e1ec25a0d8ac2ff65e8e7c4e5d9d1ee1bab6ea513589b9e841a0)...
Loaded image: registry:2.8.2
sh start-registry.sh 
===> Start registry
be7b2cd72cd0f39588bb6083f730ac840e08de766143010d61cd8d9f4215289f

配置 /etc/hosts

$ cat /etc/hosts
10.70.0.73 registry.upm

测试

nerdctl tag registry:2.8.2 registry.upm:35000/registry:2.8.2
nerdctl --insecure-registry=true push  registry.upm:35000/registry:2.8.2
nerdctl --insecure-registry=true pull  registry.upm:35000/registry:2.8.2

输出:

$ nerdctl --insecure-registry=true push  registry.upm:35000/registry:2.8.2
INFO[0000] pushing as a reduced-platform image (application/vnd.docker.distribution.manifest.v2+json, sha256:43408412c6b1e1ec25a0d8ac2ff65e8e7c4e5d9d1ee1bab6ea513589b9e841a0) 
WARN[0000] skipping verifying HTTPS certs for "registry.upm:35000" 
manifest-sha256:43408412c6b1e1ec25a0d8ac2ff65e8e7c4e5d9d1ee1bab6ea513589b9e841a0: waiting        |--------------------------------------| 
config-sha256:fb59138d7af16a5974de721cb6a4399b9700f0ade6a1bc91209a174245cfb789:   waiting        |--------------------------------------| 
elapsed: 0.1 s                                                                    total:   0.0 B (0.0 B/s)                                         
WARN[0000] server "registry.upm:35000" does not seem to support HTTPS, falling back to plain HTTP  error="failed to do request: Head \"https://registry.upm:35000/v2/registry/blobs/sha256:6db7f901dc3b0c738464ace0ea79250b5341508cf23d091bcaf37332befa1209\": http: server gave HTTP response to HTTPS client"
manifest-sha256:43408412c6b1e1ec25a0d8ac2ff65e8e7c4e5d9d1ee1bab6ea513589b9e841a0: waiting        |--------------------------------------| 
config-sha256:fb59138d7af16a5974de721cb6a4399b9700f0ade6a1bc91209a174245cfb789:   waiting        |--------------------------------------| 
elapsed: 0.6 s                                                                    total:   0.0 B (0.0 B/s)           

配置镜像入库

配置但不执行:

$ cd /root/kubernetes-offline/kubespray-offline-2.23.0-0/outputs
$ cat load-push-all-images.sh 
#!/bin/bashsource ./config.shLOCAL_REGISTRY=${LOCAL_REGISTRY:-"registry.upm:${REGISTRY_PORT}"}  #修改 registry.upm
NERDCTL=/usr/local/bin/nerdctlBASEDIR="."
if [ ! -d images ] && [ -d ../outputs ]; thenBASEDIR="../outputs"  # for tests
fiload_images() {for image in $BASEDIR/images/*.tar.gz; doecho "===> Loading $image"sudo $NERDCTL load -i $imagedone
}push_images() {images=$(cat $BASEDIR/images/*.list)for image in $images; do# Removes specific repo parts from each image for kubespraynewImage=$imagefor repo in registry.k8s.io k8s.gcr.io gcr.io docker.io quay.io; donewImage=$(echo ${newImage} | sed s@^${repo}/@@)donenewImage=${LOCAL_REGISTRY}/${newImage}echo "===> Tag ${image} -> ${newImage}"sudo $NERDCTL tag ${image} ${newImage}echo "===> Push ${newImage}"sudo $NERDCTL --insecure-registry=true push ${newImage}done
}load_images
push_images

执行 set-all.sh

[root@bastion01 outputs]# cat setup-all.sh 
#!/bin/bashrun() {echo "=> Running: $*"$* || {echo "Failed in : $*"exit 1}
}# prepare
#run ./setup-container.sh# start web server
run ./start-nginx.sh# setup local repositories
run ./setup-offline.sh# setup python
run ./setup-py.sh# start private registry
#run ./start-registry.sh# load and push all images to registry
run ./load-push-all-images.sh

执行:

sh -x set-all.sh

7. bastion01 配置互信

ssh-keygen
for i in {71..78};do ssh-copy-id root@10.70.0.$i;done

8. 启动容器部署环境

nerdctl load -i quay.io_kubespray_kubespray_v2.23.1.tar 
nerdctl  run --name kubespray-offline-ansible --network=host  -it -v "$(pwd)"/kubespray-offline-2.23.0-0:/kubespray -v "${HOME}"/.ssh:/root/.ssh  -v /etc/hosts:/etc/hosts quay.io/kubespray/kubespray:v2.23.1  bash

9. 部署前准备

检查批量通信、镜像仓库地址域名解析、可能存在缺失的内核加载模块。

9.1 配置 extract-kubespray.sh

保持 kubespray-v2.22.1 内容不变,注释掉 apply patches内容。

cd /root/kubernetes-offline/kubespray-offline-2.23.0-0/outputs
./extract-kubespray.sh

9.2 编写 inventory.ini

vim kubespray-2.23.0/inventory/sample/inventory.ini
[all]
kube-master01 ansible_host=10.70.0.71
kube-master02 ansible_host=10.70.0.72
kube-master03 ansible_host=10.70.0.73
kube-node01 ansible_host=10.70.0.74
kube-node02 ansible_host=10.70.0.75
kube-node03 ansible_host=10.70.0.76[bastion]
bastion01 ansible_host=10.70.0.78 ansible_user=root[kube_control_plane]
kube-master01
kube-master02
kube-master03[etcd]
kube-master01
kube-master02
kube-master03[kube_node]
kube-node01
kube-node02
kube-node03[calico_rr][k8s_cluster:children]
kube_control_plane
kube_node
calico_rr

执行:

ansible -i inventory/sample/inventory.ini all  -m ping
ansible -i inventory/sample/inventory.ini all -m lineinfile -a "path=/etc/hosts line='10.70.0.78 registry.upm'"
ansible -i inventory/sample/inventory.ini all -m lineinfile -a "path=/etc/rc.local line='modprobe br_netfilter\nmodprobe ip_conntrack'"
echo "nameserver 8.8.8.8" >  /etc/resolv.conf
ansible -i inventory/sample/inventory.ini all -m copy -a "src=/etc/resolv.conf dest=/etc/"

9.3 编写 offline.yml

vim  outputs/kubespray-2.23.1/inventry/sample/group_vars/all/offline.yml
http_server: "http://10.60.0.30"
registry_host: "registry.demo:35000"containerd_insecure_registries: # Kubespray #8340"registry.demo:35000": "http://registry.demo:35000"files_repo: "{{ http_server }}/files"
yum_repo: "{{ http_server }}/rpms"
ubuntu_repo: "{{ http_server }}/debs"# Registry overrides
kube_image_repo: "{{ registry_host }}"
gcr_image_repo: "{{ registry_host }}"
docker_image_repo: "{{ registry_host }}"
quay_image_repo: "{{ registry_host }}"# Download URLs: See roles/download/defaults/main.yml of kubespray.
kubeadm_download_url: "{{ files_repo }}/kubernetes/{{ kube_version }}/kubeadm"
kubectl_download_url: "{{ files_repo }}/kubernetes/{{ kube_version }}/kubectl"
kubelet_download_url: "{{ files_repo }}/kubernetes/{{ kube_version }}/kubelet"
# etcd is optional if you **DON'T** use etcd_deployment=host
etcd_download_url: "{{ files_repo }}/kubernetes/etcd/etcd-{{ etcd_version }}-linux-amd64.tar.gz"
cni_download_url: "{{ files_repo }}/kubernetes/cni/cni-plugins-linux-{{ image_arch }}-{{ cni_version }}.tgz"
crictl_download_url: "{{ files_repo }}/kubernetes/cri-tools/crictl-{{ crictl_version }}-{{ ansible_system | lower }}-{{ image_arch }}.tar.gz"
# If using Calico
calicoctl_download_url: "{{ files_repo }}/kubernetes/calico/{{ calico_ctl_version }}/calicoctl-linux-{{ image_arch }}"
# If using Calico with kdd
calico_crds_download_url: "{{ files_repo }}/kubernetes/calico/{{ calico_version }}.tar.gz"runc_download_url: "{{ files_repo }}/runc/{{ runc_version }}/runc.{{ image_arch }}"
nerdctl_download_url: "{{ files_repo }}/nerdctl-{{ nerdctl_version }}-{{ ansible_system | lower }}-{{ image_arch }}.tar.gz"
containerd_download_url: "{{ files_repo }}/containerd-{{ containerd_version }}-linux-{{ image_arch }}.tar.gz"#containerd_insecure_registries:
#    "{{ registry_addr }}":"{{ registry_host }}"# CentOS/Redhat/AlmaLinux/Rocky Linux
## Docker / Containerd
docker_rh_repo_base_url: "{{ yum_repo }}/docker-ce/$releasever/$basearch"
docker_rh_repo_gpgkey: "{{ yum_repo }}/docker-ce/gpg"# Fedora
## Docker
docker_fedora_repo_base_url: "{{ yum_repo }}/docker-ce/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}"
docker_fedora_repo_gpgkey: "{{ yum_repo }}/docker-ce/gpg"
## Containerd
containerd_fedora_repo_base_url: "{{ yum_repo }}/containerd"
containerd_fedora_repo_gpgkey: "{{ yum_repo }}/docker-ce/gpg"

9.4 配置 containerd.yml

$ vim  inventory/sample/group_vars/all/containerd.yml
......
containerd_registries_mirrors:- prefix: registry.upm:35000mirrors:- host: http://registry.upm:35000capabilities: ["pull", "resolve"]skip_verify: true
....

9.5 配置 nerdctl

解决镜像拉取失败

vim roles/container-engine/nerdctl/templates/nerdctl.toml.j2 
...
insecure_registry = true #添加

9.6 配置 nf_conntrack

123-148行 nf_conntrack_ipv4修改为 nf_conntrack

$ vim roles/kubernetes/node/tasks/main.yml
- name: Modprobe nf_conntrackcommunity.general.modprobe:name: nf_conntrackstate: presentregister: modprobe_nf_conntrackignore_errors: true  # noqa ignore-errorswhen:- kube_proxy_mode == 'ipvs'tags:- kube-proxy- name: Persist ip_vs modulescopy:dest: /etc/modules-load.d/kube_proxy-ipvs.confmode: 0644content: |ip_vsip_vs_rrip_vs_wrrip_vs_sh{% if modprobe_nf_conntrack is success -%}nf_conntrack{%-   endif -%}when: kube_proxy_mode == 'ipvs'tags:- kube-proxy

10. 部署 offline repo

Deploy offline repo configurations which use your yum_repo/ubuntu_repo to all target nodes using ansible.
First, copy offline setup playbook to kubespray directory.

ansible -i inventory/sample/inventory.ini all -m shell -a  "mv /etc/yum.repos.d /tmp"
ansible -i inventory/sample/inventory.ini all -m shell -a  "mkdir /etc/yum.repos.d"
cp -r ../playbook .
ansible-playbook -i  inventory/sample/inventory.ini playbook/offline-repo.yml 
ansible -i inventory/sample/inventory.ini all  -m shell -a "yum repolist --verbose"

开始部署

ansible-playbook -i inventory/sample/inventory.ini --become --become-user=root cluster.yml

输出:

PLAY RECAP ***************************************************************************************************
bastion01                  : ok=6    changed=0    unreachable=0    failed=0    skipped=14   rescued=0    ignored=0   
kube-master01              : ok=765  changed=153  unreachable=0    failed=0    skipped=1273 rescued=0    ignored=8   
kube-node01                : ok=525  changed=95   unreachable=0    failed=0    skipped=773  rescued=0    ignored=1   
kube-node02                : ok=525  changed=95   unreachable=0    failed=0    skipped=772  rescued=0    ignored=1   
kube-node03                : ok=525  changed=95   unreachable=0    failed=0    skipped=772  rescued=0    ignored=1   
localhost                  : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   Tuesday 21 November 2023  05:08:21 +0000 (0:00:01.427)       0:55:24.797 ****** 
=============================================================================== 
container-engine/containerd : Download_file | Download item ------------------------------------------ 55.86s
container-engine/crictl : Download_file | Download item ---------------------------------------------- 54.44s
container-engine/nerdctl : Download_file | Download item --------------------------------------------- 52.61s
bootstrap-os : Assign inventory name to unconfigured hostnames (non-CoreOS, non-Flatcar, Suse and ClearLinux, non-Fedora) -- 45.77s
container-engine/runc : Download_file | Download item ------------------------------------------------ 45.30s
container-engine/runc : Download_file | Validate mirrors --------------------------------------------- 43.93s
container-engine/nerdctl : Download_file | Validate mirrors ------------------------------------------ 41.38s
container-engine/crictl : Download_file | Validate mirrors ------------------------------------------- 39.49s
container-engine/containerd : Download_file | Validate mirrors --------------------------------------- 39.12s
etcdctl_etcdutl : Download_file | Download item ------------------------------------------------------ 38.89s
container-engine/crictl : Extract_file | Unpacking archive ------------------------------------------- 38.35s
download : Download_file | Download item ------------------------------------------------------------- 33.73s
kubernetes-apps/ansible : Kubernetes Apps | Lay Down CoreDNS templates ------------------------------- 32.09s
kubernetes/control-plane : Kubeadm | Initialize first master ----------------------------------------- 31.33s
etcdctl_etcdutl : Extract_file | Unpacking archive --------------------------------------------------- 28.66s
container-engine/nerdctl : Extract_file | Unpacking archive ------------------------------------------ 27.99s
kubernetes-apps/ansible : Kubernetes Apps | Start Resources ------------------------------------------ 26.80s
Gather necessary facts (hardware) -------------------------------------------------------------------- 25.67s
bootstrap-os : Gather host facts to get ansible_distribution_version ansible_distribution_major_version -- 24.51s
download : Download | Download files / images -------------------------------------------------------- 24.30s#登陆master01节点
[root@kube-master01 ~]# kubectl get node 
NAME            STATUS   ROLES           AGE     VERSION
kube-master01   Ready    control-plane   7h53m   v1.27.7
kube-node01     Ready    <none>          7h51m   v1.27.7
kube-node02     Ready    <none>          7h51m   v1.27.7
kube-node03     Ready    <none>          7h51m   v1.27.7

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/163011.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

分布式篇---第二篇

系列文章目录 文章目录 系列文章目录前言一、你知道哪些分布式事务解决方案?二、什么是二阶段提交?三、什么是三阶段提交?前言 前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到网站,这篇文章男女通用,看懂了就去分享给你…

基于Pytorch框架多人多摄像头摔倒跌倒坠落检测系统

欢迎大家点赞、收藏、关注、评论啦 &#xff0c;由于篇幅有限&#xff0c;只展示了部分核心代码。 文章目录 一项目简介 二、功能三、系统四. 总结 一项目简介 深度学习在计算机视觉领域的应用已经取得了显著的进展&#xff0c;特别是在多人多摄像头场景下的摔倒跌倒检测。通过…

java异常 try/catch/throw/throws

try-catch一般用在最上层的程序里&#xff0c;可以配合throws和throw再将异常抛给用户&#xff0c;这种情况会使上层代码中断。也可以不选择抛出&#xff0c;这种上层代码会继续运行。 被调用的方法如果有异常的可能可以通过throws抛给上层处理&#xff0c;不加try catch的情况…

Vue环境的搭建

1.Vue开发的两种方式 &#xff08;1&#xff09;核心包传统开发模式 基于html/css/js文件&#xff0c;直接引入和辛堡&#xff0c;开发Vue。 &#xff08;2&#xff09;工程化开发模式&#xff1a; 主要是基于构建工具&#xff08;例如,webpack&#xff09;的环境中开发Vue…

【ARM 嵌入式 编译系列 2.2 -- 如何在Makefile 中添加编译时间 | 编译作者| 编译 git id】

请阅读【ARM GCC 编译专栏导读】 上篇文章&#xff1a;【ARM 嵌入式 编译系列 2.1 – GCC 编译参数学习】 下篇文章&#xff1a;【ARM 嵌入式 编译系列 2.3 – GCC 中指定 ARMv8-M 的 Thumb 指令集参数详细介绍】 文章目录 编译参数介绍 编译参数介绍 通常我们在 OS 启动的时…

福州大学《嵌入式系统综合设计》实验五:图像裁剪及尺寸变换

一、实验目的 在深度学习中&#xff0c;往往需要从一张大图中裁剪出一张张小图&#xff0c;以便适应网络输入图像的尺寸&#xff0c;这可以通过bmcv_image_crop函数实现。 实践中&#xff0c;经常需要对输入图像的尺寸进行调整&#xff0c;以适用于网络输入图片尺寸&#xff0…

查看sql语句执行计划并重建索引

晚上cpu报警显示当前cpu使用率达到90%以上&#xff0c;不到10%的空闲 先查询当前sql&#xff1a; #&#xff08;ORACLE&#xff09; SQL > set line 200 pages 1000 col event for a30 col program for a30 col username for a12 col sql_id for a15 col INST_ID for 9999 …

前端开发学习 (二) 事件修饰符、系统命令

其实&#xff0c;我们上一章的时候就已经说过了一些系统指令&#xff0c;这里详细介绍一下 一、v-on的事件修饰符 事件作用click点击时触发submit表单被提交时触发input输入框发生改变时触发keyup按键松开时触发keydown按键按下时触发mouseover鼠标悬停触发mouseout当鼠标移开…

安徽省广德市选择云轴科技ZStack Cloud云平台建设县级智慧城市

信创是数字中国建设的重要组成部分&#xff0c;也是数字经济发展的关键推动力量。作为云基础软件企业&#xff0c;云轴科技ZStack产品矩阵全面覆盖数据中心云基础设施&#xff0c;ZStack信创云首批通过可信云《一云多芯IaaS平台能力要求》先进级&#xff0c;是其中唯一兼容四种…

错误记录:AttributeError/TypeError

【pycharm】报错&#xff1a;AttributeError: partially initialized module ‘numpy’ has no attribute ‘array’ (most likely due to a circular import)的错误 文件名与调用包的名称一致引起歧义 解决办法&#xff1a;修改文件名重新run 【pycharm】报错&#xff1a;T…

【Web】NewStarCTF Week1 个人复现

目录 ①泄露的秘密 ②Begin of Upload ③Begin of HTTP ④ErrorFlask ⑤Begin of PHP ⑥R!C!E! ⑦EasyLogin ①泄露的秘密 盲猜/robots.txt,访问得到flag前半部分 第二个没试出来&#xff0c;老老实实拿dirsearch扫吧 访问/www.zip 下载附件&#xff0c;拿到第二部分…

SpringCloud原理-OpenFeign篇(一、Hello OpenFeign项目示例)

文章目录 前言正文一、项目结构二、服务调用链路说明三、Rpc调用链路说明四、项目代码4.1 client 模块中的feign接口4.2 client 中的rest接口4.3 client 中的启动类4.4 server中的rest接口4.5 server中的配置文件 五、调试 附录附1&#xff1a;本系列文章链接 前言 本篇是Spri…

示波器探头讲解及案例分享

示波器探头讲解 示波器探头 分为X1、X10档&#xff1a; X1档&#xff0c;表示被测量的信号没有经过衰减进入示波器 X10档&#xff0c;表示被测量的信号衰减10倍进入示波器&#xff08;当示波器也设置为10X档&#xff0c;直接读数即可&#xff0c;但是当示波器设置为1X档&…

vue 目录树的展开与关闭

目录 1、翻页方法中控制目录树节点的展开与关闭2、搜索目录树节点名称控制节点的展开与关闭 <el-tree:data"data_option"ref"tree":props"defaultProps"node-click"handleNodeClick":default-expanded-keys"needExpandedKeys&…

1、开发工具介绍及软件安装

软件安装 百度网盘链接&#xff1a;https://pan.baidu.com/s/1J7sgXntt9eLNBhI1Dc6MsQ?pwd2023 提取码&#xff1a;2023 # 一 Keil5安装步骤&#xff1a; 激活&#xff1a; STC-ISP安装步骤&#xff1a; STC-ISP.exe安装即用 安装CH340_CH341驱动程序 所有学习课程和资源…

【vue】ant-design-vue的树结构实现节点增删改查

根据业务需要&#xff0c;实现树结构的节点新增编辑删除功能&#xff0c;主要逻辑是利用树节点的scopedSlots属性对其进行自定义改造&#xff0c;监听悬停事件在节点右侧出现增删改对应图标&#xff0c;点击图标出现弹窗表单对内容进行修改&#xff0c;具体代码如下&#xff1a…

蓝桥杯每日一题2023.11.23

题目描述 题目分析 本题使用递归模拟即可&#xff0c;将每一个大格子都可以拆分看成几个小格子&#xff0c;先将最开始的数字进行填入&#xff0c;使每一个对应小格子的值都为大格子对应的数&#xff0c;搜索找到符合要求的即可 &#xff08;答案&#xff1a;50 33 30 41&am…

Vue3+ts学习笔记2

<script setup lang"ts"> import {onBeforeMount,onMounted,onBeforeUpdate,onUpdated,onBeforeUnmount,onUnmounted} from vueonBeforeMount(()>{console.log(---挂载之前---) })onMounted(()>{console.log(---挂载---) })onBeforeUpdate(()>{consol…

Python爬取京东商品销售数据进行数据分析示例代码,以口红为例

文章目录 一、准备工作驱动安装模块使用与介绍 二、流程解析三、完整代码四、效果展示关于Python技术储备一、Python所有方向的学习路线二、Python基础学习视频三、精品Python学习书籍四、Python工具包项目源码合集①Python工具包②Python实战案例③Python小游戏源码五、面试资…

git代码提交命令(如何提交代码)

# 提交暂存区到仓库区 $ git commit -m [message]# 提交暂存区的指定文件到仓库区 $ git commit [file1] [file2] ... -m [message]# 提交工作区自上次commit之后的变化&#xff0c;直接到仓库区 $ git commit -a# 提交时显示所有diff信息 $ git commit -v# 使用一次新的commit…