创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
腾讯云主机,openeuler22.10LTS,16C,64G
Kubernetes版本信息
使用kubekey 安装k8s-1.25.3,
容器运行时
[root@master install]# crictl version
DEBU[0000] get runtime connection
DEBU[0000] VersionRequest: &VersionRequest{Version:v1,}
DEBU[0000] VersionResponse: &VersionResponse{Version:0.1.0,RuntimeName:containerd,RuntimeVersion:v1.7.1,RuntimeApiVersion:v1,}
Version: 0.1.0
RuntimeName: containerd
RuntimeVersion: v1.7.1
RuntimeApiVersion: v1
KubeSphere版本信息
kubesphere-3.4.1,在线使用kk安装
kk配置文件:
apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
name: sample
spec:
hosts:
- {name: master, address: 10.30.10.13, internalAddress: 10.30.10.13, user: root, password: “Ntt@2024!”}
- {name: node1, address: 10.30.10.7, internalAddress: 10.30.10.7, user: root, password: “Ntt@2024!”}
roleGroups:
etcd:
- master
control-plane:
- master
worker:
- node1
controlPlaneEndpoint:
domain:
address: “10.30.10.13”
port: 6443
kubernetes:
version: v1.25.3
clusterName: cluster.local
autoRenewCerts: true
containerManager: containerd
etcd:
type: kubekey
network:
plugin: calico
kubePodsCIDR: 10.233.64.0/16
kubeServiceCIDR: 10.233.0.0/16
multusCNI:
enabled: false
registry:
privateRegistry: ""
namespaceOverride: ""
registryMirrors: []
insecureRegistries: []
addons: []
---
apiVersion: installer.kubesphere.io/v1alpha1
kind: ClusterConfiguration
metadata:
name: ks-installer
namespace: kubesphere-system
labels:
version: v3.4.1
spec:
persistence:
storageClass: ""
authentication:
jwtSecret: ""
local_registry: ""
etcd:
monitoring: true
endpointIps: localhost
port: 2379
tlsEnable: true
common:
core:
console:
enableMultiLogin: true
port: 30880
type: NodePort
redis:
enabled: false
enableHA: false
volumeSize: 2Gi
openldap:
enabled: false
volumeSize: 2Gi
minio:
volumeSize: 20Gi
monitoring:
endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090
GPUMonitoring:
enabled: false
gpu:
kinds:
- resourceName: “nvidia.com/gpu”
resourceType: “GPU”
default: false
es:
enabled: false
logMaxAge: 7
elkPrefix: logstash
basicAuth:
enabled: false
username: ""
password: ""
externalElasticsearchHost: ""
externalElasticsearchPort: ""
opensearch:
enabled: true
logMaxAge: 7
opensearchPrefix: whizard
basicAuth:
enabled: true
username: “admin”
password: “admin”
externalOpensearchHost: ""
externalOpensearchPort: ""
dashboard:
enabled: false
alerting:
enabled: false
auditing:
enabled: false
devops:
enabled: true
jenkinsCpuReq: 0.5
jenkinsCpuLim: 1
jenkinsMemoryReq: 4Gi
jenkinsMemoryLim: 4Gi
jenkinsVolumeSize: 16Gi
events:
enabled: false
ruler:
enabled: true
replicas: 2
# resources: {}
logging:
enabled: false
logsidecar:
enabled: true
replicas: 2
# resources: {}
metrics_server:
enabled: true
monitoring:
storageClass: ""
node_exporter:
port: 9100
gpu:
nvidia_dcgm_exporter:
enabled: false
# resources: {}
multicluster:
clusterRole: none
network:
networkpolicy:
enabled: false
ippool:
type: none
topology:
type: none
openpitrix:
store:
enabled: false
servicemesh:
enabled: true
istio:
components:
ingressGateways:
- name: istio-ingressgateway
enabled: true
cni:
enabled: false
edgeruntime:
enabled: false
kubeedge:
enabled: false
cloudCore:
cloudHub:
advertiseAddress:
- ""
service:
cloudhubNodePort: “30000”
cloudhubQuicNodePort: “30001”
cloudhubHttpsNodePort: “30002”
cloudstreamNodePort: “30003”
tunnelNodePort: “30004”
# resources: {}
# hostNetWork: false
iptables-manager:
enabled: true
mode: “external”
# resources: {}
# edgeService:
# resources: {}
gatekeeper:
enabled: false
# controller_manager:
# resources: {}
# audit:
# resources: {}
terminal:
timeout: 600
问题是什么
[InitKubernetesModule] Init cluster using kubeadm
集群初始化时报错,提示超时,
kubelet提示 “Error getting node” err="node \“master\” not found"
journalctl -u kubelet 提示:
reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
failed to list *v1.Node: Get “https://lb.kubesphere.local:6443/api/v1/nodes?fieldSelector=metadata.name%3Dmaster&limit=500&resourceVersion=0”: dial tcp 10.30.10.13:6443: connect: connection refused
actory.go:134: Failed to watch *v1.Node: failed to list *v1.Node: Get “https://lb.kubesphere.local:6443/api/v1/nodes?fieldSelector=metadata.name%3Dmaster&limit=500&resourceVersion=0”: dial tcp 10.30.10.13:6443: connect: connection refused