k8s v1.26.2 安装部署步骤

准备

开通端口

master需要开通的端口:
TCP: 6443 2379 2380 10250 10259 10257 ,10250 30000~30010(应用)

node需要开通的端口:
TCP: 10250 30000~30010(应用)

master加端口
firewall-cmd --permanent --add-port=6443/tcp
firewall-cmd --permanent --add-port=2379/tcp
firewall-cmd --permanent --add-port=2380/tcp
firewall-cmd --permanent --add-port=10250/tcp
firewall-cmd --permanent --add-port=10259/tcp
firewall-cmd --permanent --add-port=10257/tcp
firewall-cmd --permanent --add-port=30000/tcp
firewall-cmd --permanent --add-port=30001/tcp
firewall-cmd --permanent --add-port=30002/tcp
firewall-cmd --permanent --add-port=30003/tcp
firewall-cmd --permanent --add-port=30004/tcp
firewall-cmd --permanent --add-port=30005/tcp
firewall-cmd --permanent --add-port=30006/tcp
firewall-cmd --permanent --add-port=30007/tcp
firewall-cmd --permanent --add-port=30008/tcp
firewall-cmd --permanent --add-port=30009/tcp
firewall-cmd --permanent --add-port=30010/tcp


Node 加端口
firewall-cmd --permanent --add-port=10250/tcp
firewall-cmd --permanent --add-port=30000/tcp
firewall-cmd --permanent --add-port=30001/tcp
firewall-cmd --permanent --add-port=30002/tcp
firewall-cmd --permanent --add-port=30003/tcp
firewall-cmd --permanent --add-port=30004/tcp
firewall-cmd --permanent --add-port=30005/tcp
firewall-cmd --permanent --add-port=30006/tcp
firewall-cmd --permanent --add-port=30007/tcp
firewall-cmd --permanent --add-port=30008/tcp
firewall-cmd --permanent --add-port=30009/tcp
firewall-cmd --permanent --add-port=30010/tcp

主机名解析

vim /etc/hosts
添加如下内容:

172.16.251.151 LTWWAPP01 
172.16.251.152 LTWWAPP02 
172.16.251.153 LTWWAPP03 
172.16.251.154 LTWWAPP04 
172.16.251.155 LTWWAPP05 
172.16.251.156 LTWWAPP06 

时间同步

K8s要求集群服务中的节点时间必须精确一致

安装: yum -y install chrony
开启网络时间同步:systemctl start chronyd
设置开机自启动:systemctl enable chronyd

禁用swap分区

vim /etc/fstab 注释掉swap那行
在这里插入图片描述

修改内核参数

##加载br_netfilter模块 
$ modprobe br_netfilter 
#验证模块是否加载成功 
$ lsmod | grep br_netfilter 
##修改内核参数 
$ 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
sysctl --system

安装运行containerd

下载 解压 二进制包

$ wget https://github.com/containerd/containerd/releases/download/v1.6.8/cri-containerd-1.6.8-linux-amd64.tar.gz 
#如果下载不下来,第一步去掉直接下载好传到服务器上
$ tar zxvf cri-containerd-1.6.8-linux-amd64.tar.gz

解压后的目录:
etc目录:主要为containerd服务管理配置文件及cni虚拟网卡配置文件;
opt目录:主要为gce环境中使用containerd配置文件及cni插件;
usr目录:主要为containerd运行时的二进制文件,包含runc

拷贝二进制可执行文件到$PATH中

$ cp usr/local/bin/* /usr/local/bin/

创建初始配置文件

$ mkdir -p /etc/containerd/
$ containerd config default > /etc/containerd/config.toml    #创建默认的配置文件

修改初始配置文件

替换镜像源

由于国内环境原因我们需要将 sandbox_image 镜像源设置为阿里云的google_containers镜像源。

$ sed -i "s#k8s.gcr.io/pause#registry.cn-hangzhou.aliyuncs.com/google_containers/pause#g"  /etc/containerd/config.toml
#等同于:
$ vim /etc/containerd/config.toml
  [plugins."io.containerd.grpc.v1.cri"]
  sandbox_image = "registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6"

配置镜像加速(在文件的中下位置,也可以不配,好像不影响)

$ vim /etc/containerd/config.toml
  [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
    [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
      endpoint = ["https://cekcu3pt.mirror.aliyuncs.com"]

配置驱动器 (可以不配)

Containerd 和 Kubernetes 默认使用旧版驱动程序来管理 cgroups,但建议在基于 systemd 的主机上使用该驱动程序,以符合 cgroup 的“单编写器”规则。

$ sed -i 's#SystemdCgroup = false#SystemdCgroup = true#g' /etc/containerd/config.toml
#等同于
$ vim /etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
  SystemdCgroup = true

创建服务管理配置文件

拷贝服务管理配置文件到/usr/lib/systemd/system/目录

$ grep -v ^# etc/systemd/system/containerd.service
$ mv etc/systemd/system/containerd.service /usr/lib/systemd/system/containerd.service

启动 containerd 服务

$ systemctl daemon-reload
$ systemctl enable --now containerd.service
$ systemctl status containerd.service
$ containerd  --version    #查看版本
#可以查看到版本

安装Runc

Runc是真正运行容器的工具

下载 安装

$ wget https://github.com/opencontainers/runc/releases/download/v1.1.3/runc.amd64
# 下载不成功就本地下载上传到服务器
$ chmod +x runc.amd64
$ mv runc.amd64 /usr/bin/runc
#提示是否重写,yes
$ runc -version 
#正常输出就没问题

配置crictl客户端

替换所有docker的命令 , 如 crictl ps

$ mv etc/crictl.yaml  /etc/
$ cat  /etc/crictl.yaml 
image-endpoint: unix:///var/run/containerd/containerd.sock

安装kubeadm、kubectl、kubelet

添加 yum 源

cat > /etc/yum.repos.d/kubernetes.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

添加网易源

否则有些包下载不下来

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

安装

yum install -y readline-devel readline
yum install -y kubelet-1.26.2 kubeadm-1.26.2 kubectl-1.24.4
systemctl enable kubelet && systemctl start kubelet && systemctl status kubelet

Kubeadm: kubeadm是一个工具,用来初始化k8s集群的
kubelet: 安装在集群所有节点上,用于启动Pod的
kubectl: 通过kubectl可以部署和管理应用,查看各种资源,创建、删除和更新各种组件

设置Table键补全

让命令可用自动table键进行补全,对新手无法记住命令提供很好的支持,所在主机进行该操作方可使用table补全

#Kubectl命令补全:
$ kubectl completion  bash >  /etc/bash_completion.d/kubelet
#Kubeadm命令补全:
$ kubeadm  completion  bash >  /etc/bash_completion.d/kubeadm

初始化master节点(master only ,以上的步骤也是)

检测安装环境

#检测主机环境是否达到集群的要求,可根据结果提示进行逐一排除故障
$ kubeadm init --dry-run

创建配置文件

创建默认的配置文件

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

修改默认配置文件

改动的点已标出

$ vim kubeadm-init.yaml
#改成如下 , 
apiVersion: kubeadm.k8s.io/v1beta3
bootstrapTokens:
- groups:
  - system:bootstrappers:kubeadm:default-node-token
  token: abcdef.0123456789abcdef
  ttl: 24h0m0s
  usages:
  - signing
  - authentication
kind: InitConfiguration
localAPIEndpoint:
  advertiseAddress: 172.16.251.151  ()
  bindPort: 6443
nodeRegistration:
  criSocket: /run/containerd/containerd.sock ()
  imagePullPolicy: IfNotPresent
  name: ltwwapp01  ()
  taints: 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.26.0
networking:
  dnsDomain: cluster.local
  podSubnet: 10.244.0.0/16
  serviceSubnet: 10.96.0.0/12
scheduler: {}

初始化

$ modprobe br_netfilter (可能不必要)
$ kubeadm init --config kubeadm-init.yaml 

环境配置

根据初始化成功后的提示对集群进行基础的配置。

$ mkdir -p $HOME/.kube
$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
$ sudo chown $(id -u):$(id -g) $HOME/.kube/config
# export KUBECONFIG=/etc/kubernetes/admin.conf 不用这条,这是临时的重启会失效
# >https://blog.youkuaiyun.com/qq_26711103/article/details/126518479

加入集群(node only)

上面init成功后会给出join命令,如:

kubeadm join 172.16.251.151:6443 --token oybtw9.i25hjwufosdn7cef --discovery-token-ca-cert-hash sha256:5daecb79990c7acf1bbd0aae780dfe5cf57d3a5edba06fa10cd419369e8b0c2f

安装Flannel (master only)

否则nodes会一直是notReady的状态

wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
#同样的如果下载不了就本地下载, 完了传上去,或者:
cat > kube-flannel.yml <<EOF
文件内容
EOF
#然后
kubectl apply -f kube-flannel.yml

等待一会,nodes就是ready了

验证集群

使用whoami来验证集群,他可以返回请求是被哪个容器处理的,而且
一来可以通过浏览器访问
在这里插入图片描述
二来可以curl 命令行里访问
在这里插入图片描述

方式一 (不好)

# 文件whoami.yaml 这个镜像是用的8000端口对外提供服务
apiVersion: apps/v1
kind: Deployment
metadata:
  name: whoami-deployment
  labels:
    app: whoami
spec:
  replicas: 3
  selector:
    matchLabels:
      app: whoami
  template:
    metadata:
      labels:
        app: whoami
    spec:
      containers:
      - name: whoami
        image: jwilder/whoami
        ports:
        - containerPort: 8000

部署whoami

kubectl apply -f whoami.yaml
#whoamiservice.yaml
apiVersion: v1
kind: Service
metadata:
  name: whoami-service
spec:
  type: NodePort
  selector:
    app: whoami
  ports:
    # 默认情况下,为了方便起见,`targetPort` 被设置为与 `port` 字段相同的值。
    - port: 8000
      targetPort: 8000
      # 可选字段
      # 默认情况下,为了方便起见,Kubernetes 控制平面会从某个范围内分配一个端口号(默认:30000-32767)
      nodePort: 30007

配置whoami的服务

kubectl apply -f whoamiservice.yaml

效果就是开头的curl和浏览器访问 30007端口. 这时候只是能访问. 是必须指定某个node的ip的,然而集群的特性就是node的随时扩容缩容.这个方法是不好的

https://kubernetes.io/zh-cn/docs/concepts/services-networking/ingress/

不能说不好, 是负载均衡之前的状态. 外部套上一层负载均衡或者叫路由转发就ok了

方法二(不需要):

NodePort虽然能够实现外部访问Pod的需求,但需要指定node的ip, 且占用了各个物理主机上的端口

https://www.likecs.com/show-205306520.html
https://kubernetes.io/zh-cn/docs/concepts/services-networking/ingress/

安装ingress-nginx (不需要)

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.7.0/deploy/static/provider/cloud/deploy.yaml

https://kubernetes.github.io/ingress-nginx/deploy/

上面的两部为什么不需要,因为正式环境是有域名配置域名解析的,不需要自己再配一套.只需要把nodeport提供出来就可以

部署 使用dashboard

dashboard.yaml 全文

# Copyright 2017 The Kubernetes 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.

apiVersion: v1
kind: Namespace
metadata:
  name: kubernetes-dashboard

---

apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard

---

kind: Service
apiVersion: v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard
spec:
  type: NodePort
  ports:
    - port: 443
      targetPort: 8443
      nodePort: 30001   ()
  selector:
    k8s-app: kubernetes-dashboard

---

apiVersion: v1
kind: Secret
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard-certs
  namespace: kubernetes-dashboard
type: Opaque

---

apiVersion: v1
kind: Secret
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard-csrf
  namespace: kubernetes-dashboard
type: Opaque
data:
  csrf: ""

---

apiVersion: v1
kind: Secret
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard-key-holder
  namespace: kubernetes-dashboard
type: Opaque

---

kind: ConfigMap
apiVersion: v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard-settings
  namespace: kubernetes-dashboard

---

kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard
rules:
  # Allow Dashboard to get, update and delete Dashboard exclusive secrets.
  - apiGroups: [""]
    resources: ["secrets"]
    resourceNames: ["kubernetes-dashboard-key-holder", "kubernetes-dashboard-certs", "kubernetes-dashboard-csrf"]
    verbs: ["get", "update", "delete"]
    # Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map.
  - apiGroups: [""]
    resources: ["configmaps"]
    resourceNames: ["kubernetes-dashboard-settings"]
    verbs: ["get", "update"]
    # Allow Dashboard to get metrics.
  - apiGroups: [""]
    resources: ["services"]
    resourceNames: ["heapster", "dashboard-metrics-scraper"]
    verbs: ["proxy"]
  - apiGroups: [""]
    resources: ["services/proxy"]
    resourceNames: ["heapster", "http:heapster:", "https:heapster:", "dashboard-metrics-scraper", "http:dashboard-metrics-scraper"]
    verbs: ["get"]

---

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
rules:
  # Allow Metrics Scraper to get metrics from the Metrics server
  - apiGroups: ["metrics.k8s.io"]
    resources: ["pods", "nodes"]
    verbs: ["get", "list", "watch"]

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: kubernetes-dashboard
subjects:
  - kind: ServiceAccount
    name: kubernetes-dashboard
    namespace: kubernetes-dashboard

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: kubernetes-dashboard
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: kubernetes-dashboard
subjects:
  - kind: ServiceAccount
    name: kubernetes-dashboard
    namespace: kubernetes-dashboard

---

kind: Deployment
apiVersion: apps/v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s-app: kubernetes-dashboard
  template:
    metadata:
      labels:
        k8s-app: kubernetes-dashboard
    spec:
      nodeName: ltwwapp01 ()
      securityContext:
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: kubernetes-dashboard
          image: kubernetesui/dashboard:v2.7.0
          imagePullPolicy: Always
          ports:
            - containerPort: 8443
              protocol: TCP
          args:
            - --auto-generate-certificates
            - --namespace=kubernetes-dashboard
            # Uncomment the following line to manually specify Kubernetes API server Host
            # If not specified, Dashboard will attempt to auto discover the API server and connect
            # to it. Uncomment only if the default does not work.
            # - --apiserver-host=http://my-address:port
          volumeMounts:
            - name: kubernetes-dashboard-certs
              mountPath: /certs
              # Create on-disk volume to store exec logs
            - mountPath: /tmp
              name: tmp-volume
          livenessProbe:
            httpGet:
              scheme: HTTPS
              path: /
              port: 8443
            initialDelaySeconds: 30
            timeoutSeconds: 30
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsUser: 1001
            runAsGroup: 2001
      volumes:
        - name: kubernetes-dashboard-certs
          secret:
            secretName: kubernetes-dashboard-certs
        - name: tmp-volume
          emptyDir: {}
      serviceAccountName: kubernetes-dashboard
      nodeSelector:
        "kubernetes.io/os": linux
      # Comment the following tolerations if Dashboard must not be deployed on master
      tolerations:
        - key: node-role.kubernetes.io/master
          effect: NoSchedule

---

kind: Service
apiVersion: v1
metadata:
  labels:
    k8s-app: dashboard-metrics-scraper
  name: dashboard-metrics-scraper
  namespace: kubernetes-dashboard
spec:
  ports:
    - port: 8000
      targetPort: 8000
  selector:
    k8s-app: dashboard-metrics-scraper

---

kind: Deployment
apiVersion: apps/v1
metadata:
  labels:
    k8s-app: dashboard-metrics-scraper
  name: dashboard-metrics-scraper
  namespace: kubernetes-dashboard
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s-app: dashboard-metrics-scraper
  template:
    metadata:
      labels:
        k8s-app: dashboard-metrics-scraper
    spec:
      nodeName:  ltwwapp01  ()
      securityContext:
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: dashboard-metrics-scraper
          image: kubernetesui/metrics-scraper:v1.0.8
          ports:
            - containerPort: 8000
              protocol: TCP
          livenessProbe:
            httpGet:
              scheme: HTTP
              path: /
              port: 8000
            initialDelaySeconds: 30
            timeoutSeconds: 30
          volumeMounts:
          - mountPath: /tmp
            name: tmp-volume
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsUser: 1001
            runAsGroup: 2001
      serviceAccountName: kubernetes-dashboard
      nodeSelector:
        "kubernetes.io/os": linux
      # Comment the following tolerations if Dashboard must not be deployed on master
      tolerations:
        - key: node-role.kubernetes.io/master
          effect: NoSchedule
      volumes:
        - name: tmp-volume
          emptyDir: {}

然后执行

kubectl apply -f dashboard.yaml 

访问

https://your_ip:30001 (注意不要直接访问your_ip:30001)

提示输入token
生成token

kubectl -n kubernetes-dashboard create token kubernetes-dashboard

kubectl create clusterrolebinding kubernetes-dashboard-cluster-admin --clusterrole=cluster-admin --serviceaccount=kubernetes-dashboard:kubernetes-dashboard
>https://blog.youkuaiyun.com/qq_41619571/article/details/127217339

常用命令

查看服务的详细信息:
kubectl describe service whoami-service
删除一个服务
kubectl delete service whoami-deployment
某个namespace
kubectl get pods -n kube-system

kubectl get all -n ingress-nginx

kubectl delete namespace jenkins

参考

https://www.cnblogs.com/ergwang/p/17205117.html
https://blog.youkuaiyun.com/qq_35644307/article/details/126120772
https://blog.youkuaiyun.com/weixin_46476452/article/details/127670046
https://blog.youkuaiyun.com/github_35735591/article/details/125533342

[root@localhost opt]# ./download_k8s_offline.sh ======================================== Kubernetes 离线部署包生成脚本 (v3.1) ======================================== 🔄 配置系统仓库... Repository epel is listed more than once in the configuration Docker CE Stable 9.6 kB/s | 3.5 kB 00:00 Kubernetes 5.3 kB/s | 1.4 kB 00:00 软件包 epel-release-8-22.el8.noarch 已安装。 依赖关系解决。 无需任何处理。 完毕! 🔄 创建 yum 缓存(不使用 fast 参数)... Repository epel is listed more than once in the configuration 38 文件已删除 Repository epel is listed more than once in the configuration CentOS-8 - BaseOS - mirrors.aliyun.com 4.2 MB/s | 4.6 MB 00:01 CentOS-8 - AppStream - mirrors.aliyun.com 6.0 MB/s | 8.4 MB 00:01 CentOS-8 - Extras - mirrors.aliyun.com 23 kB/s | 10 kB 00:00 Extra Packages for Enterprise Linux 8 - x86_64 7.1 MB/s | 14 MB 00:01 Docker CE Stable 145 kB/s | 79 kB 00:00 Kubernetes 297 kB/s | 182 kB 00:00 元数据缓存已建立。 ✅ 仓库配置完成 🛠️ 安装必要工具... Repository epel is listed more than once in the configuration 上次元数据过期检查:0:00:09 前,执行于 2025年07月25日 星期五 04时51分38秒。 软件包 yum-utils-4.0.21-3.el8.noarch 已安装。 软件包 createrepo_c-0.17.2-3.el8.x86_64 已安装。 软件包 wget-1.19.5-10.el8.x86_64 已安装。 软件包 curl-7.61.1-22.el8.x86_64 已安装。 软件包 jq-1.5-12.el8.x86_64 已安装。 依赖关系解决。 无需任何处理。 完毕! ✅ 工具安装完成 🔍 检测可用 Kubernetes 版本... 📋 可用 Kubernetes 版本: 1) 1.33.3 2) 1.33.2 3) 1.33.1 4) 1.33.0 5) 1.32.7 6) 1.32.6 7) 1.32.5 8) 1.32.4 9) 1.32.3 10) 1.32.2 11) 1.28.2-0 12) 1.28.1-0 13) 1.28.0-0 14) 1.27.6-0 15) 1.27.5-0 16) 1.27.4-0 17) 1.27.3-0 18) 1.27.2-0 19) 1.27.1-0 20) 1.27.0-0 21) 1.26.9-0 22) 1.26.8-0 23) 1.26.7-0 24) 1.26.6-0 25) 1.26.5-0 26) 1.26.4-0 27) 1.26.3-0 28) 1.26.2-0 29) 1.26.1-0 30) 1.26.0-0 31) 1.25.14-0 32) 1.25.13-0 33) 1.25.12-0 34) 1.25.11-0 35) 1.25.10-0 36) 1.25.9-0 37) 1.25.8-0 38) 1.25.7-0 39) 1.25.6-0 40) 1.25.5-0 41) 1.25.4-0 42) 1.25.3-0 43) 1.25.2-0 44) 1.25.1-0 45) 1.25.0-0 46) 1.24.17-0 47) 1.24.16-0 48) 1.24.15-0 49) 1.24.14-0 50) 1.24.13-0 51) 1.24.12-0 52) 1.24.11-0 53) 1.24.10-0 54) 1.24.9-0 55) 1.24.8-0 56) 1.24.7-0 57) 1.24.6-0 58) 1.24.5-0 59) 1.24.4-0 60) 1.24.3-0 61) 1.24.2-0 62) 1.24.1-0 63) 1.24.0-0 64) 1.23.17-0 65) 1.23.16-0 66) 1.23.15-0 67) 1.23.14-0 68) 1.23.13-0 69) 1.23.12-0 70) 1.23.11-0 71) 1.23.10-0 72) 1.23.9-0 73) 1.23.8-0 74) 1.23.7-0 75) 1.23.6-0 76) 1.23.5-0 77) 1.23.4-0 78) 1.23.3-0 79) 1.23.2-0 80) 1.23.1-0 81) 1.23.0-0 82) 1.22.17-0 83) 1.22.16-0 84) 1.22.15-0 85) 1.22.14-0 86) 1.22.13-0 87) 1.22.12-0 88) 1.22.11-0 89) 1.22.10-0 90) 1.22.9-0 91) 1.22.8-0 92) 1.22.7-0 93) 1.22.6-0 94) 1.22.5-0 95) 1.22.4-0 96) 1.22.3-0 97) 1.22.2-0 98) 1.22.1-0 99) 1.22.0-0 100) 1.21.14-0 101) 1.21.13-0 102) 1.21.12-0 103) 1.21.11-0 104) 1.21.10-0 105) 1.21.9-0 106) 1.21.8-0 107) 1.21.7-0 108) 1.21.6-0 109) 1.21.5-0 110) 1.21.4-0 111) 1.21.3-0 112) 1.21.2-0 113) 1.21.1-0 114) 1.21.0-0 115) 1.20.15-0 116) 1.20.14-0 117) 1.20.13-0 118) 1.20.12-0 119) 1.20.11-0 120) 1.20.10-0 121) 1.20.9-0 122) 1.20.8-0 123) 1.20.7-0 124) 1.20.6-0 125) 1.20.5-0 126) 1.20.4-0 127) 1.20.2-0 128) 1.20.1-0 129) 1.20.0-0 130) 1.19.16-0 131) 1.19.15-0 132) 1.19.14-0 133) 1.19.13-0 134) 1.19.12-0 135) 1.19.11-0 136) 1.19.10-0 137) 1.19.9-0 138) 1.19.8-0 139) 1.19.7-0 140) 1.19.6-0 141) 1.19.5-0 142) 1.19.4-0 143) 1.19.3-0 144) 1.19.2-0 145) 1.19.1-0 146) 1.19.0-0 147) 1.18.20-0 148) 1.18.19-0 149) 1.18.18-0 150) 1.18.17-0 151) 1.18.16-0 152) 1.18.15-0 153) 1.18.14-0 154) 1.18.13-0 155) 1.18.12-0 156) 1.18.10-0 157) 1.18.9-0 158) 1.18.8-0 159) 1.18.6-0 160) 1.18.5-0 161) 1.18.4-1 162) 1.18.4-0 163) 1.18.3-0 164) 1.18.2-0 165) 1.18.1-0 166) 1.18.0-0 167) 1.17.17-0 168) 1.17.16-0 169) 1.17.15-0 170) 1.17.14-0 171) 1.17.13-0 172) 1.17.12-0 173) 1.17.11-0 174) 1.17.9-0 175) 1.17.8-0 176) 1.17.7-1 177) 1.17.7-0 178) 1.17.6-0 179) 1.17.5-0 180) 1.17.4-0 181) 1.17.3-0 182) 1.17.2-0 183) 1.17.1-0 184) 1.17.0-0 185) 1.16.15-0 186) 1.16.14-0 187) 1.16.13-0 188) 1.16.12-0 189) 1.16.11-1 190) 1.16.11-0 191) 1.16.10-0 192) 1.16.9-0 193) 1.16.8-0 194) 1.16.7-0 195) 1.16.6-0 196) 1.16.5-0 197) 1.16.4-0 198) 1.16.3-0 199) 1.16.2-0 200) 1.16.1-0 201) 1.16.0-0 202) 1.15.12-0 203) 1.15.11-0 204) 1.15.10-0 205) 1.15.9-0 206) 1.15.8-0 207) 1.15.7-0 208) 1.15.6-0 209) 1.15.5-0 210) 1.15.4-0 211) 1.15.3-0 212) 1.15.2-0 213) 1.15.1-0 214) 1.15.0-0 215) 1.14.10-0 216) 1.14.9-0 217) 1.14.8-0 218) 1.14.7-0 219) 1.14.6-0 220) 1.14.5-0 221) 1.14.4-0 222) 1.14.3-0 223) 1.14.2-0 224) 1.14.1-0 225) 1.14.0-0 226) 1.13.12-0 227) 1.13.11-0 228) 1.13.10-0 229) 1.13.9-0 230) 1.13.8-0 231) 1.13.7-0 232) 1.13.6-0 233) 1.13.5-0 234) 1.13.4-0 235) 1.13.3-0 236) 1.13.2-0 237) 1.13.1-0 238) 1.13.0-0 239) 1.12.10-0 240) 1.12.9-0 241) 1.12.8-0 242) 1.12.7-0 243) 1.12.6-0 244) 1.12.5-0 245) 1.12.4-0 246) 1.12.3-0 247) 1.12.2-0 248) 1.12.1-0 249) 1.12.0-0 250) 1.11.10-0 251) 1.11.9-0 252) 1.11.8-0 253) 1.11.7-0 254) 1.11.6-0 255) 1.11.5-0 256) 1.11.4-0 257) 1.11.3-0 258) 1.11.2-0 259) 1.11.1-0 260) 1.11.0-0 261) 1.10.13-0 262) 1.10.12-0 263) 1.10.11-0 264) 1.10.10-0 265) 1.10.9-0 266) 1.10.8-0 267) 1.10.7-0 268) 1.10.6-0 269) 1.10.5-0 270) 1.10.4-0 271) 1.10.3-0 272) 1.10.2-0 273) 1.10.1-0 274) 1.10.0-0 275) 1.9.11-0 276) 1.9.10-0 277) 1.9.9-0 278) 1.9.8-0 279) 1.9.7-0 280) 1.9.6-0 281) 1.9.5-0 282) 1.9.4-0 283) 1.9.3-0 284) 1.9.2-0 285) 1.9.1-0 286) 1.9.0-0 287) 1.8.15-0 288) 1.8.14-0 289) 1.8.13-0 290) 1.8.12-0 291) 1.8.11-0 292) 1.8.10-0 293) 1.8.9-0 294) 1.8.8-0 295) 1.8.7-0 296) 1.8.6-0 297) 1.8.5-1 298) 1.8.5-0 299) 1.8.4-1 300) 1.8.4-0 301) 1.8.3-1 302) 1.8.3-0 303) 1.8.2-1 304) 1.8.2-0 305) 1.8.1-1 306) 1.8.1-0 307) 1.8.0-1 308) 1.8.0-0 309) 1.7.16-0 310) 1.7.15-0 311) 1.7.14-0 312) 1.7.11-1 313) 1.7.11-0 314) 1.7.10-1 315) 1.7.10-0 316) 1.7.9-1 317) 1.7.9-0 318) 1.7.8-2 319) 1.7.8-1 320) 1.7.7-2 321) 1.7.7-1 322) 1.7.6-2 323) 1.7.6-1 324) 1.7.5-1 325) 1.7.5-0 326) 1.7.4-1 327) 1.7.4-0 328) 1.7.3-2 329) 1.7.3-1 330) 1.7.2-1 331) 1.7.2-0 332) 1.7.1-1 333) 1.7.1-0 334) 1.7.0-1 335) 1.7.0-0 336) 1.6.13-1 337) 1.6.13-0 338) 1.6.12-1 339) 1.6.12-0 340) 1.6.11-1 341) 1.6.11-0 342) 1.6.10-1 343) 1.6.10-0 344) 1.6.9-1 345) 1.6.9-0 346) 1.6.8-1 347) 1.6.8-0 348) 1.6.7-1 349) 1.6.7-0 350) 1.6.6-1 351) 1.6.6-0 352) 1.6.5-1 353) 1.6.5-0 354) 1.6.4-1 355) 1.6.4-0 356) 1.6.3-1 357) 1.6.3-0 358) 1.6.2-1 359) 1.6.2-0 360) 1.6.1-1 361) 1.6.1-0 362) 1.6.0-1 363) 1.6.0-0 364) 1.5.4-1 365) 1.5.4-0 👉 请选择版本号 [1-365, 默认1]: 11 ✅ 已选择版本: Kubernetes v1.28.2 📦 下载Kubernetes组件... ⬇️ 下载: kubelet-1.28.2-0 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.el7.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.el7.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.el7.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.x86_64.rpm 🔄 使用yumdownloader下载: kubelet Repository epel is listed more than once in the configuration 错误:未知仓库:'k8s-*' mv: '/opt/k8s-offline/packages/kubelet-1.28.2-0.rpm' 与'/opt/k8s-offline/packages/kubelet-1.28.2-0.rpm' 为同一文件 ✅ yumdownloader下载成功: kubelet-1.28.2-0.rpm ⬇️ 下载: kubeadm-1.28.2-0 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.el7.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.el7.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.el7.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.x86_64.rpm 🔄 使用yumdownloader下载: kubeadm Repository epel is listed more than once in the configuration 错误:未知仓库:'k8s-*' mv: '/opt/k8s-offline/packages/kubeadm-1.28.2-0.rpm' 与'/opt/k8s-offline/packages/kubeadm-1.28.2-0.rpm' 为同一文件 ✅ yumdownloader下载成功: kubeadm-1.28.2-0.rpm ⬇️ 下载: kubectl-1.28.2-0 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.el7.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.el7.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.el7.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.x86_64.rpm 🔄 使用yumdownloader下载: kubectl Repository epel is listed more than once in the configuration 错误:未知仓库:'k8s-*' mv: '/opt/k8s-offline/packages/kubectl-1.28.2-0.rpm' 与'/opt/k8s-offline/packages/kubectl-1.28.2-0.rpm' 为同一文件 ✅ yumdownloader下载成功: kubectl-1.28.2-0.rpm ⬇️ 下载: cri-tools-1.26.0 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.el7.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.el7.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.el8.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.el7.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.el7.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.el8.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.el7.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.el7.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.el8.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.x86_64.rpm 🔄 使用yumdownloader下载: cri-tools Repository epel is listed more than once in the configuration 错误:未知仓库:'k8s-*' mv: '/opt/k8s-offline/packages/cri-tools-1.26.0.rpm' 与'/opt/k8s-offline/packages/cri-tools-1.26.0.rpm' 为同一文件 ✅ yumdownloader下载成功: cri-tools-1.26.0.rpm ✅ Kubernetes组件下载完成 🐳 下载Docker组件... 根据日志重新生成所有脚本
07-26
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值