![我可以在 kubernetes 初始化后更改 controlPlaneEndpoint 吗?](https://linux22.com/image/793873/%E6%88%91%E5%8F%AF%E4%BB%A5%E5%9C%A8%20kubernetes%20%E5%88%9D%E5%A7%8B%E5%8C%96%E5%90%8E%E6%9B%B4%E6%94%B9%20controlPlaneEndpoint%20%E5%90%97%EF%BC%9F.png)
我是 Kubernetes 新手,这是我的 Kubernetes 版本信息
kubeadm version: &version.Info{
Major:"1",
Minor:"27",
GitVersion:"v1.27.3",
GitCommit:"25b4e43193bcda6c7328a6d147b1fb73a33f1598",
GitTreeState:"clean",
BuildDate:"2023-06-14T09:52:26Z",
GoVersion:"go1.20.5",
Compiler:"gc",
Platform:"linux/amd64"
}
我想使用堆叠-etcd-拓扑形式。
这是我的 kubeadm init 配置文件
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: 192.168.44.135
bindPort: 6443
nodeRegistration:
criSocket: unix:///var/run/cri-dockerd.sock
imagePullPolicy: IfNotPresent
taints: null
---
apiServer:
timeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta3
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controllerManager: {}
dns: {}
etcd:
local:
dataDir: /data/paas/etcd
kind: ClusterConfiguration
kubernetesVersion: 1.27.3
networking:
dnsDomain: cluster.local
serviceSubnet: 10.96.0.0/12
podSubnet: 10.244.0.0/16
scheduler: {}
controlPlaneEndpoint: "192.168.44.135:6443" # load balancer, first control plane ip
---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: systemd
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: ipvs
我将其设置controlPlaneEndpoint
为第一个控制平面节点的 IP,因为我们之前的项目正在运行kube-vip
并将Daemonset
其用于负载平衡,我想controlPlaneEndpoint
在安装后稍后进行配置kube-vip
。
我似乎没有在 kubernetes 文档中找到有关修改的任何内容controlPlaneEndpoint
,我该如何做到这一点,如果不允许,我会尝试尽早安装负载平衡。
期待您的帮助。