From 7e84deb7de056630cd9afa489ac3353b45a7fed9 Mon Sep 17 00:00:00 2001 From: joy Date: Thu, 30 Oct 2025 17:09:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20scripts/kubeadm-conf.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit aaaa --- scripts/kubeadm-conf.yaml | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 scripts/kubeadm-conf.yaml diff --git a/scripts/kubeadm-conf.yaml b/scripts/kubeadm-conf.yaml new file mode 100644 index 0000000..2cc71a6 --- /dev/null +++ b/scripts/kubeadm-conf.yaml @@ -0,0 +1,50 @@ +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: LOCALIP #必须修改为当前master节点IP,三节点必须修改 + bindPort: 6443 +nodeRegistration: + criSocket: unix:///run/containerd/containerd.sock #必须修改为自己的 + imagePullPolicy: IfNotPresent + name: HOSTNAME #主机节点名称 三节点必须修改 + taints: null +--- +apiServer: + timeoutForControlPlane: 4m0s + certSANs: # 包含所有master IP和VIP,新增内容 + - "MASTER01_IP" + - "MASTER01_IP" + - "MASTER01_IP" + - "CLUSTER_VIP" + - "localhost" + - "127.0.0.1" +apiVersion: kubeadm.k8s.io/v1beta3 +certificatesDir: /etc/kubernetes/pki +clusterName: kubernetes +controllerManager: {} +dns: {} +etcd: + local: + dataDir: /var/lib/etcd +imageRepository: registry.cn-hangzhou.aliyuncs.com/google_containers #将registry.k8s.io改为阿里云地址 +kind: ClusterConfiguration +kubernetesVersion: K8SVERSION #版本号 +controlPlaneEndpoint: "CLUSTER_VIP:CLUSTER_PORT" #新增: VIP:端口 集群的统一入口 +networking: + dnsDomain: cluster.local + serviceSubnet: 10.96.0.0/12 + podSubnet: 10.244.0.0/16 #指定pod子网 +scheduler: {} +--- +# IPVS +apiVersion: kubeproxy.config.k8s.io/v1alpha1 +kind: KubeProxyConfiguration +mode: ipvs