24sama 好的 照做
`
:~# crictl info
{
“status”: {
“conditions”: [
{
“type”: “RuntimeReady”,
“status”: true,
“reason”: "",
“message”: ""
},
{
“type”: “NetworkReady”,
“status”: false,
“reason”: “NetworkPluginNotReady”,
“message”: “Network plugin returns error: cni plugin not initialized”
}
]
},
“cniconfig”: {
“PluginDirs”: [
“/opt/cni/bin”
],
“PluginConfDir”: “/etc/cni/net.d”,
“PluginMaxConfNum”: 1,
“Prefix”: “eth”,
“Networks”: [
{
“Config”: {
“Name”: “cni-loopback”,
“CNIVersion”: “0.3.1”,
“Plugins”: [
{
“Network”: {
“type”: “loopback”,
“ipam”: {},
“dns”: {}
},
“Source”: "{\“type\”:\“loopback\”}"
}
],
“Source”: "{\n\“cniVersion\”: \“0.3.1\”,\n\“name\”: \“cni-loopback\”,\n\“plugins\”: [{\n \“type\”: \“loopback\”\n}]\n}"
},
“IFName”: “lo”
}
]
},
“config”: {
“containerd”: {
“snapshotter”: “zfs”,
“defaultRuntimeName”: “runc”,
“defaultRuntime”: {
“runtimeType”: "",
“runtimePath”: "",
“runtimeEngine”: "",
“PodAnnotations”: [],
“ContainerAnnotations”: [],
“runtimeRoot”: "",
“options”: {},
“privileged_without_host_devices”: false,
“baseRuntimeSpec”: "",
“cniConfDir”: "",
“cniMaxConfNum”: 0
},
“untrustedWorkloadRuntime”: {
“runtimeType”: "",
“runtimePath”: "",
“runtimeEngine”: "",
“PodAnnotations”: [],
“ContainerAnnotations”: [],
“runtimeRoot”: "",
“options”: {},
“privileged_without_host_devices”: false,
“baseRuntimeSpec”: "",
“cniConfDir”: "",
“cniMaxConfNum”: 0
},
“runtimes”: {
“runc”: {
“runtimeType”: “io.containerd.runc.v2”,
“runtimePath”: "",
“runtimeEngine”: "",
“PodAnnotations”: [],
“ContainerAnnotations”: [],
“runtimeRoot”: "",
“options”: {
“BinaryName”: "",
“CriuImagePath”: "",
“CriuPath”: "",
“CriuWorkPath”: "",
“IoGid”: 0,
“IoUid”: 0,
“NoNewKeyring”: false,
“NoPivotRoot”: false,
“Root”: "",
“ShimCgroup”: "",
“SystemdCgroup”: true
},
“privileged_without_host_devices”: false,
“baseRuntimeSpec”: "",
“cniConfDir”: "",
“cniMaxConfNum”: 0
}
},
“noPivot”: false,
“disableSnapshotAnnotations”: true,
“discardUnpackedLayers”: false,
“ignoreRdtNotEnabledErrors”: false
},
“cni”: {
“binDir”: “/opt/cni/bin”,
“confDir”: “/etc/cni/net.d”,
“maxConfNum”: 1,
“confTemplate”: "",
“ipPref”: ""
},
“registry”: {
“configPath”: "",
“mirrors”: {},
“configs”: {},
“auths”: {},
“headers”: {
“User-Agent”: [
“containerd/v1.6.4”
]
}
},
“imageDecryption”: {
“keyModel”: “node”
},
“disableTCPService”: true,
“streamServerAddress”: “127.0.0.1”,
“streamServerPort”: “0”,
“streamIdleTimeout”: “4h0m0s”,
“enableSelinux”: false,
“selinuxCategoryRange”: 1024,
“sandboxImage”: “k8s.gcr.io/pause:3.6”,
“statsCollectPeriod”: 10,
“systemdCgroup”: false,
“enableTLSStreaming”: false,
“x509KeyPairStreaming”: {
“tlsCertFile”: "",
“tlsKeyFile”: ""
},
“maxContainerLogSize”: 16384,
“disableCgroup”: true,
“disableApparmor”: false,
“restrictOOMScoreAdj”: false,
“maxConcurrentDownloads”: 3,
“disableProcMount”: false,
“unsetSeccompProfile”: "",
“tolerateMissingHugetlbController”: true,
“disableHugetlbController”: true,
“device_ownership_from_security_context”: false,
“ignoreImageDefinedVolumes”: false,
“netnsMountsUnderStateDir”: false,
“enableUnprivilegedPorts”: false,
“enableUnprivilegedICMP”: false,
“containerdRootDir”: “/var/lib/containerd”,
“containerdEndpoint”: “/run/containerd/containerd.sock”,
“rootDir”: “/var/lib/containerd/io.containerd.grpc.v1.cri”,
“stateDir”: “/run/containerd/io.containerd.grpc.v1.cri”
},
“golang”: “go1.17.9”,
“lastCNILoadStatus”: “cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config”,
“lastCNILoadStatus.default”: “cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config”
}
`
`
:~# cat /etc/kubernetes/kubeadm-config.yaml
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
etcd:
external:
endpoints:
- https://192.168.50.6:2379
- https://192.168.50.20:2379
- https://192.168.50.10:2379
caFile: /etc/ssl/etcd/ssl/ca.pem
certFile: /etc/ssl/etcd/ssl/node-pvesc.pem
keyFile: /etc/ssl/etcd/ssl/node-pvesc-key.pem
dns:
type: CoreDNS
imageRepository: registry.cn-beijing.aliyuncs.com/kubesphereio
imageTag: 1.8.0
imageRepository: registry.cn-beijing.aliyuncs.com/kubesphereio
kubernetesVersion: v1.22.10
certificatesDir: /etc/kubernetes/pki
clusterName: pvesc.lan
controlPlaneEndpoint: lb.kubesphere.local:6443
networking:
dnsDomain: cluster.local
podSubnet: 10.233.64.0/18
serviceSubnet: 192.168.50.0/24
apiServer:
extraArgs:
audit-log-maxage: “30”
audit-log-maxbackup: “10”
audit-log-maxsize: “100”
bind-address: 0.0.0.0
feature-gates: CSIStorageCapacity=true,ExpandCSIVolumes=true,RotateKubeletServerCertificate=true,TTLAfterFinished=true
certSANs:
- kubernetes
- kubernetes.default
- kubernetes.default.svc
- kubernetes.default.svc.cluster.local
- localhost
- 127.0.0.1
- lb.kubesphere.local
- 192.168.50.6
- pvesc
- pvesc.cluster.local
- h170i
- h170i.cluster.local
- 192.168.50.10
- ryzenpve
- ryzenpve.cluster.local
- 192.168.50.20
- neopve
- neopve.cluster.local
- 192.168.50.23
- qm77prx
- qm77prx.cluster.local
- 192.168.50.40
- sdb2640m
- sdb2640m.cluster.local
- 192.168.50.253
- 192.168.50.1
controllerManager:
extraArgs:
node-cidr-mask-size: “24”
bind-address: 0.0.0.0
experimental-cluster-signing-duration: 87600h
feature-gates: TTLAfterFinished=true,CSIStorageCapacity=true,ExpandCSIVolumes=true,RotateKubeletServerCertificate=true
extraVolumes:
- name: host-time
hostPath: /etc/localtime
mountPath: /etc/localtime
readOnly: true
scheduler:
extraArgs:
bind-address: 0.0.0.0
feature-gates: CSIStorageCapacity=true,ExpandCSIVolumes=true,RotateKubeletServerCertificate=true,TTLAfterFinished=true
—
apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
localAPIEndpoint:
advertiseAddress: 192.168.50.6
bindPort: 6443
nodeRegistration:
criSocket: unix:///run/containerd/containerd.sock
kubeletExtraArgs:
cgroup-driver: systemd
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
clusterCIDR: 10.233.64.0/18
iptables:
masqueradeAll: false
masqueradeBit: 14
minSyncPeriod: 0s
syncPeriod: 30s
mode: ipvs
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: systemd
clusterDNS:
- 169.254.25.10
clusterDomain: cluster.local
containerLogMaxFiles: 3
containerLogMaxSize: 5Mi
evictionHard:
memory.available: 5%
pid.available: 5%
evictionMaxPodGracePeriod: 120
evictionPressureTransitionPeriod: 30s
evictionSoft:
memory.available: 10%
evictionSoftGracePeriod:
memory.available: 2m
featureGates:
CSIStorageCapacity: true
ExpandCSIVolumes: true
RotateKubeletServerCertificate: true
TTLAfterFinished: true
kubeReserved:
cpu: 200m
memory: 250Mi
maxPods: 110
rotateCertificates: true
systemReserved:
cpu: 200m
memory: 250Mi
`