最佳实践
bj-net
apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
bootstrapTokens:
- groups:
- system:bootstrappers:kubeadm:default-node-token
ttl: 0s
usages:
- signing
- authentication
---
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
kubernetesVersion: v1.19.2
controlPlaneEndpoint: k8s-api.bj-net.ehualu.local:6443
imageRepository: registry.aliyuncs.com/k8sxio
networking:
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/12
etcd:
local:
extraArgs:
listen-metrics-urls: http://0.0.0.0:2381
apiServer:
certSANs:
- localhost
- 127.0.0.1
- k8s-api.bj-net.ehualu.local
- 172.19.42.214
- node-3.bj-net
- 172.19.42.223
- node-2.bj-net
- 172.19.42.222
- node-1.bj-net
- 172.19.42.221
- master-3.bj-net
- 172.19.42.213
- master-2.bj-net
- 172.19.42.212
- master-1.bj-net
- 172.19.42.211
extraArgs:
service-node-port-range: 30000-60000
extraVolumes:
- name: host-time
hostPath: /etc/localtime
mountPath: /etc/localtime
readOnly: true
controllerManager:
extraArgs:
bind-address: 0.0.0.0
extraVolumes:
- name: host-time
hostPath: /etc/localtime
mountPath: /etc/localtime
readOnly: true
scheduler:
extraArgs:
bind-address: 0.0.0.0
extraVolumes:
- name: host-time
hostPath: /etc/localtime
mountPath: /etc/localtime
readOnly: true
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: "ipvs"
---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: systemd
kubeReserved:
cpu: 200m
memory: 250Mi
systemReserved:
cpu: 200m
memory: 250Mi
evictionHard:
memory.available: 5%
evictionSoft:
memory.available: 10%
evictionSoftGracePeriod:
memory.available: 2m
bj-cs
apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
bootstrapTokens:
- groups:
- system:bootstrappers:kubeadm:default-node-token
ttl: 0s
usages:
- signing
- authentication
---
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
kubernetesVersion: v1.19.2
controlPlaneEndpoint: k8s-api.bj-cs.desistdaydream.ltd:6443
imageRepository: registry.aliyuncs.com/k8sxio
networking:
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/12
etcd:
local:
extraArgs:
listen-metrics-urls: http://0.0.0.0:2381
apiServer:
certSANs:
- localhost
- 127.0.0.1
- k8s-api.bj-cs.desistdaydream.ltd
- 172.19.42.195
- node-3.bj-cs
- 172.19.42.198
- node-2.bj-cs
- 172.19.42.197
- node-1.bj-cs
- 172.19.42.196
- master-3.bj-cs
- 172.19.42.194
- master-2.bj-cs
- 172.19.42.193
- master-1.bj-cs
- 172.19.42.192
extraArgs:
service-node-port-range: 30000-60000
extraVolumes:
- name: host-time
hostPath: /etc/localtime
mountPath: /etc/localtime
readOnly: true
controllerManager:
extraArgs:
bind-address: 0.0.0.0
extraVolumes:
- name: host-time
hostPath: /etc/localtime
mountPath: /etc/localtime
readOnly: true
scheduler:
extraArgs:
bind-address: 0.0.0.0
extraVolumes:
- name: host-time
hostPath: /etc/localtime
mountPath: /etc/localtime
readOnly: true
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: "ipvs"
---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: systemd
kubeReserved:
cpu: 200m
memory: 250Mi
systemReserved:
cpu: 200m
memory: 250Mi
evictionHard:
memory.available: 5%
evictionSoft:
memory.available: 10%
evictionSoftGracePeriod:
memory.available: 2m
反馈
此页是否对你有帮助?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.