创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
发帖前请点击 发表主题 右边的 预览(👀) 按钮,确保帖子格式正确。
操作系统信息
例如:虚拟机/物理机,Centos7.5/Ubuntu18.04,4C/8G
Oralc Linux7(CentOS7)
Kubernetes版本信息
例如:v18.6。单节点还是多节点。
v1.26.1 多节点
容器运行时
例如,使用 docker/containerd,版本多少
containerd v1.6.23
KubeSphere版本信息
例如:v2.1.1/v3.0.0。离线安装还是在线安装。已有K8s安装还是全套安装。
KubeSphere 版本 : v3.4.1 在线安装(已有双栈k8s安装KubeSphere,本次增加额外套件)
问题是什么
报错日志是什么,最好有截图。
部分日志:
TASK [ks-core/ks-core : KubeSphere | Importing ks-core status] *****************
FAILED - RETRYING: KubeSphere | Importing ks-core status (5 retries left).
FAILED - RETRYING: KubeSphere | Importing ks-core status (4 retries left).
FAILED - RETRYING: KubeSphere | Importing ks-core status (3 retries left).
FAILED - RETRYING: KubeSphere | Importing ks-core status (2 retries left).
FAILED - RETRYING: KubeSphere | Importing ks-core status (1 retries left).
fatal: [localhost]: FAILED! => {"attempts": 5, "changed": true, "cmd": "/usr/local/bin/kubectl patch cc ks-installer --type merge -p '{\"status\": {\"core\": {\"status\": \"enabled\", \"enabledTime\": \"2023-11-16T15:56:36CST\"}}}' -n kubesphere-system\n", "delta": "0:00:00.149733", "end": "2023-11-16 15:56:54.795204", "failed_when_result": true, "msg": "non-zero return code", "rc": 1, "start": "2023-11-16 15:56:54.645471", "stderr": "Error from server (NotFound): configconstraints.apps.kubeblocks.io \"ks-installer\" not found", "stderr_lines": ["Error from server (NotFound): configconstraints.apps.kubeblocks.io \"ks-installer\" not found"], "stdout": "", "stdout_lines": []}
PLAY RECAP *********************************************************************
localhost : ok=23 changed=17 unreachable=0 failed=1 skipped=11 rescued=0 ignored=0
完整日志:
2023-11-16T15:52:35+08:00 INFO : shell-operator latest
2023-11-16T15:52:35+08:00 INFO : HTTP SERVER Listening on 0.0.0.0:9115
2023-11-16T15:52:35+08:00 INFO : Use temporary dir: /tmp/shell-operator
2023-11-16T15:52:35+08:00 INFO : Initialize hooks manager ...
2023-11-16T15:52:35+08:00 INFO : Search and load hooks ...
2023-11-16T15:52:35+08:00 INFO : Load hook config from '/hooks/kubesphere/installRunner.py'
2023-11-16T15:52:38+08:00 INFO : Load hook config from '/hooks/kubesphere/schedule.sh'
2023-11-16T15:52:38+08:00 INFO : Initializing schedule manager ...
2023-11-16T15:52:38+08:00 INFO : KUBE Init Kubernetes client
2023-11-16T15:52:38+08:00 INFO : KUBE-INIT Kubernetes client is configured successfully
2023-11-16T15:52:38+08:00 INFO : MAIN: run main loop
2023-11-16T15:52:38+08:00 INFO : MAIN: add onStartup tasks
2023-11-16T15:52:38+08:00 INFO : QUEUE add all HookRun@OnStartup
2023-11-16T15:52:38+08:00 INFO : Running schedule manager ...
2023-11-16T15:52:38+08:00 INFO : MSTOR Create new metric shell_operator_tasks_queue_length
2023-11-16T15:52:38+08:00 INFO : MSTOR Create new metric shell_operator_live_ticks
2023-11-16T15:52:38+08:00 INFO : GVR for kind 'ClusterConfiguration' is installer.kubesphere.io/v1alpha1, Resource=clusterconfigurations
2023-11-16T15:52:38+08:00 INFO : EVENT Kube event 'f95404e7-b2dc-46bc-8002-5718c163ff55'
2023-11-16T15:52:38+08:00 INFO : QUEUE add TASK_HOOK_RUN@KUBE_EVENTS kubesphere/installRunner.py
2023-11-16T15:52:41+08:00 INFO : TASK_RUN HookRun@KUBE_EVENTS kubesphere/installRunner.py
2023-11-16T15:52:41+08:00 INFO : Running hook 'kubesphere/installRunner.py' binding 'KUBE_EVENTS' ...
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : Generating images list] ***************************************
skipping: [localhost]
TASK [download : Synchronizing images] *****************************************
TASK [kubesphere-defaults : KubeSphere | Setting images' namespace override] ***
skipping: [localhost]
TASK [kubesphere-defaults : KubeSphere | Configuring defaults] *****************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [preinstall : KubeSphere | Stopping if Kubernetes version is nonsupport] ***
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [preinstall : KubeSphere | Checking StorageClass] *************************
changed: [localhost]
TASK [preinstall : KubeSphere | Stopping if StorageClass was not found] ********
skipping: [localhost]
TASK [preinstall : KubeSphere | Checking default StorageClass] *****************
changed: [localhost]
TASK [preinstall : KubeSphere | Stopping if default StorageClass was not found] ***
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [preinstall : KubeSphere | Stop if bad admin password] ********************
skipping: [localhost]
TASK [preinstall : KubeSphere | Checking KubeSphere component] *****************
changed: [localhost]
TASK [preinstall : KubeSphere | Getting KubeSphere component version] **********
changed: [localhost]
TASK [preinstall : KubeSphere | Getting KubeSphere component version] **********
skipping: [localhost] => (item=ks-openldap)
skipping: [localhost] => (item=ks-redis)
skipping: [localhost] => (item=ks-minio)
skipping: [localhost] => (item=ks-openpitrix)
skipping: [localhost] => (item=elasticsearch-logging)
skipping: [localhost] => (item=elasticsearch-logging-curator)
skipping: [localhost] => (item=istio)
skipping: [localhost] => (item=istio-init)
skipping: [localhost] => (item=jaeger-operator)
skipping: [localhost] => (item=ks-jenkins)
skipping: [localhost] => (item=ks-sonarqube)
skipping: [localhost] => (item=logging-fluentbit-operator)
skipping: [localhost] => (item=uc)
skipping: [localhost] => (item=metrics-server)
PLAY RECAP *********************************************************************
localhost : ok=7 changed=4 unreachable=0 failed=0 skipped=6 rescued=0 ignored=0
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : Generating images list] ***************************************
skipping: [localhost]
TASK [download : Synchronizing images] *****************************************
TASK [kubesphere-defaults : KubeSphere | Setting images' namespace override] ***
skipping: [localhost]
TASK [kubesphere-defaults : KubeSphere | Configuring defaults] *****************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [Metrics-Server | Getting metrics-server installation files] **************
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Creating manifests] ********************
skipping: [localhost] => (item={'file': 'metrics-server.yaml'})
TASK [metrics-server : Metrics-Server | Checking Metrics-Server] ***************
skipping: [localhost]
TASK [Metrics-Server | Uninstalling old metrics-server] ************************
skipping: [localhost]
TASK [Metrics-Server | Installing new metrics-server] **************************
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Waitting for metrics.k8s.io ready] *****
skipping: [localhost]
TASK [Metrics-Server | Importing metrics-server status] ************************
skipping: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=10 rescued=0 ignored=0
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : Generating images list] ***************************************
skipping: [localhost]
TASK [download : Synchronizing images] *****************************************
TASK [kubesphere-defaults : KubeSphere | Setting images' namespace override] ***
skipping: [localhost]
TASK [kubesphere-defaults : KubeSphere | Configuring defaults] *****************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [common : KubeSphere | Checking kube-node-lease namespace] ****************
changed: [localhost]
TASK [common : KubeSphere | Getting system namespaces] *************************
ok: [localhost]
TASK [common : set_fact] *******************************************************
ok: [localhost]
TASK [common : debug] **********************************************************
ok: [localhost] => {
"msg": [
"kubesphere-system",
"kubesphere-controls-system",
"kubesphere-monitoring-system",
"kubesphere-monitoring-federated",
"kube-node-lease",
"kubesphere-logging-system",
"kubesphere-devops-system",
"istio-system"
]
}
TASK [common : KubeSphere | Creating KubeSphere namespace] *********************
changed: [localhost] => (item=kubesphere-system)
changed: [localhost] => (item=kubesphere-controls-system)
changed: [localhost] => (item=kubesphere-monitoring-system)
changed: [localhost] => (item=kubesphere-monitoring-federated)
changed: [localhost] => (item=kube-node-lease)
changed: [localhost] => (item=kubesphere-logging-system)
changed: [localhost] => (item=kubesphere-devops-system)
changed: [localhost] => (item=istio-system)
TASK [common : KubeSphere | Labeling system-workspace] *************************
changed: [localhost] => (item=default)
changed: [localhost] => (item=kube-public)
changed: [localhost] => (item=kube-system)
changed: [localhost] => (item=kubesphere-system)
changed: [localhost] => (item=kubesphere-controls-system)
changed: [localhost] => (item=kubesphere-monitoring-system)
changed: [localhost] => (item=kubesphere-monitoring-federated)
changed: [localhost] => (item=kube-node-lease)
changed: [localhost] => (item=kubesphere-logging-system)
changed: [localhost] => (item=kubesphere-devops-system)
changed: [localhost] => (item=istio-system)
TASK [common : KubeSphere | Labeling namespace for network policy] *************
changed: [localhost]
TASK [common : KubeSphere | Getting Kubernetes master num] *********************
changed: [localhost]
TASK [common : KubeSphere | Setting master num] ********************************
ok: [localhost]
TASK [KubeSphere | Getting common component installation files] ****************
changed: [localhost] => (item=common)
TASK [common : KubeSphere | Checking Kubernetes version] ***********************
changed: [localhost]
TASK [KubeSphere | Getting common component installation files] ****************
changed: [localhost] => (item=snapshot-controller)
TASK [common : KubeSphere | Creating snapshot controller values] ***************
changed: [localhost] => (item={'name': 'custom-values-snapshot-controller', 'file': 'custom-values-snapshot-controller.yaml'})
TASK [common : KubeSphere | Updating snapshot crd] *****************************
changed: [localhost]
TASK [common : KubeSphere | Deploying snapshot controller] *********************
changed: [localhost]
TASK [KubeSphere | Checking openpitrix common component] ***********************
changed: [localhost]
TASK [common : include_tasks] **************************************************
skipping: [localhost] => (item={'op': 'openpitrix-db', 'ks': 'mysql-pvc'})
skipping: [localhost] => (item={'op': 'openpitrix-etcd', 'ks': 'etcd-pvc'})
TASK [common : Getting PersistentVolumeName (mysql)] ***************************
skipping: [localhost]
TASK [common : Getting PersistentVolumeSize (mysql)] ***************************
skipping: [localhost]
TASK [common : Setting PersistentVolumeName (mysql)] ***************************
skipping: [localhost]
TASK [common : Setting PersistentVolumeSize (mysql)] ***************************
skipping: [localhost]
TASK [common : Getting PersistentVolumeName (etcd)] ****************************
skipping: [localhost]
TASK [common : Getting PersistentVolumeSize (etcd)] ****************************
skipping: [localhost]
TASK [common : Setting PersistentVolumeName (etcd)] ****************************
skipping: [localhost]
TASK [common : Setting PersistentVolumeSize (etcd)] ****************************
skipping: [localhost]
TASK [common : KubeSphere | Checking mysql PersistentVolumeClaim] **************
changed: [localhost]
TASK [common : KubeSphere | Setting mysql db pv size] **************************
skipping: [localhost]
TASK [common : KubeSphere | Checking redis PersistentVolumeClaim] **************
changed: [localhost]
TASK [common : KubeSphere | Setting redis db pv size] **************************
skipping: [localhost]
TASK [common : KubeSphere | Checking minio PersistentVolumeClaim] **************
changed: [localhost]
TASK [common : KubeSphere | Setting minio pv size] *****************************
ok: [localhost]
TASK [common : KubeSphere | Checking openldap PersistentVolumeClaim] ***********
changed: [localhost]
TASK [common : KubeSphere | Setting openldap pv size] **************************
ok: [localhost]
TASK [common : KubeSphere | Checking etcd db PersistentVolumeClaim] ************
changed: [localhost]
TASK [common : KubeSphere | Setting etcd pv size] ******************************
skipping: [localhost]
TASK [common : KubeSphere | Checking redis ha PersistentVolumeClaim] ***********
changed: [localhost]
TASK [common : KubeSphere | Setting redis ha pv size] **************************
ok: [localhost]
TASK [common : KubeSphere | Checking es-master PersistentVolumeClaim] **********
changed: [localhost]
TASK [common : KubeSphere | Setting es master pv size] *************************
skipping: [localhost]
TASK [common : KubeSphere | Checking es data PersistentVolumeClaim] ************
changed: [localhost]
TASK [common : KubeSphere | Setting es data pv size] ***************************
skipping: [localhost]
TASK [common : KubeSphere | Checking opensearch-master PersistentVolumeClaim] ***
changed: [localhost]
TASK [common : KubeSphere | Setting opensearch master pv size] *****************
ok: [localhost]
TASK [common : KubeSphere | Checking opensearch data PersistentVolumeClaim] ****
changed: [localhost]
TASK [common : KubeSphere | Setting opensearch data pv size] *******************
ok: [localhost]
TASK [KubeSphere | Creating common component manifests] ************************
changed: [localhost] => (item={'path': 'redis', 'file': 'redis.yaml'})
TASK [common : KubeSphere | Deploying etcd and mysql] **************************
skipping: [localhost] => (item=etcd.yaml)
skipping: [localhost] => (item=mysql.yaml)
TASK [common : KubeSphere | Getting minio installation files] ******************
skipping: [localhost] => (item=minio-ha)
TASK [common : KubeSphere | Creating manifests] ********************************
skipping: [localhost] => (item={'name': 'custom-values-minio', 'file': 'custom-values-minio.yaml'})
TASK [common : KubeSphere | Checking minio] ************************************
skipping: [localhost]
TASK [common : KubeSphere | Deploying minio] ***********************************
skipping: [localhost]
TASK [common : debug] **********************************************************
skipping: [localhost]
TASK [common : fail] ***********************************************************
skipping: [localhost]
TASK [common : KubeSphere | Importing minio status] ****************************
skipping: [localhost]
TASK [common : KubeSphere | Generet Random password] ***************************
skipping: [localhost]
TASK [common : KubeSphere | Creating Redis Password Secret] ********************
skipping: [localhost]
TASK [common : KubeSphere | Getting redis installation files] ******************
skipping: [localhost] => (item=redis-ha)
TASK [common : KubeSphere | Creating manifests] ********************************
skipping: [localhost] => (item={'name': 'custom-values-redis', 'file': 'custom-values-redis.yaml'})
TASK [common : KubeSphere | Checking old redis status] *************************
skipping: [localhost]
TASK [common : KubeSphere | Deleting and backup old redis svc] *****************
skipping: [localhost]
TASK [common : KubeSphere | Deploying redis] ***********************************
skipping: [localhost]
TASK [common : KubeSphere | Deploying redis] ***********************************
skipping: [localhost] => (item=redis.yaml)
TASK [common : KubeSphere | Importing redis status] ****************************
skipping: [localhost]
TASK [common : KubeSphere | Getting openldap installation files] ***************
skipping: [localhost] => (item=openldap-ha)
TASK [common : KubeSphere | Creating manifests] ********************************
skipping: [localhost] => (item={'name': 'custom-values-openldap', 'file': 'custom-values-openldap.yaml'})
TASK [common : KubeSphere | Checking old openldap status] **********************
skipping: [localhost]
TASK [common : KubeSphere | Shutdown ks-account] *******************************
skipping: [localhost]
TASK [common : KubeSphere | Deleting and backup old openldap svc] **************
skipping: [localhost]
TASK [common : KubeSphere | Checking openldap] *********************************
skipping: [localhost]
TASK [common : KubeSphere | Deploying openldap] ********************************
skipping: [localhost]
TASK [common : KubeSphere | Loading old openldap data] *************************
skipping: [localhost]
TASK [common : KubeSphere | Checking openldap-ha status] ***********************
skipping: [localhost]
TASK [common : KubeSphere | Getting openldap-ha pod list] **********************
skipping: [localhost]
TASK [common : KubeSphere | Getting old openldap data] *************************
skipping: [localhost]
TASK [common : KubeSphere | Migrating openldap data] ***************************
skipping: [localhost]
TASK [common : KubeSphere | Disabling old openldap] ****************************
skipping: [localhost]
TASK [common : KubeSphere | Restarting openldap] *******************************
skipping: [localhost]
TASK [common : KubeSphere | Restarting ks-account] *****************************
skipping: [localhost]
TASK [common : KubeSphere | Importing openldap status] *************************
skipping: [localhost]
TASK [common : KubeSphere | Checking KubeSphere Config is Exists] **************
changed: [localhost]
TASK [common : KubeSphere | Generet Random password] ***************************
skipping: [localhost]
TASK [common : KubeSphere | Creating Redis Password Secret] ********************
skipping: [localhost]
TASK [common : KubeSphere | Getting redis installation files] ******************
skipping: [localhost] => (item=redis-ha)
TASK [common : KubeSphere | Creating manifests] ********************************
skipping: [localhost] => (item={'name': 'custom-values-redis', 'file': 'custom-values-redis.yaml'})
TASK [common : KubeSphere | Checking old redis status] *************************
skipping: [localhost]
TASK [common : KubeSphere | Deleting and backup old redis svc] *****************
skipping: [localhost]
TASK [common : KubeSphere | Deploying redis] ***********************************
skipping: [localhost]
TASK [common : KubeSphere | Deploying redis] ***********************************
skipping: [localhost] => (item=redis.yaml)
TASK [common : KubeSphere | Importing redis status] ****************************
skipping: [localhost]
TASK [common : KubeSphere | Getting openldap installation files] ***************
skipping: [localhost] => (item=openldap-ha)
TASK [common : KubeSphere | Creating manifests] ********************************
skipping: [localhost] => (item={'name': 'custom-values-openldap', 'file': 'custom-values-openldap.yaml'})
TASK [common : KubeSphere | Checking old openldap status] **********************
skipping: [localhost]
TASK [common : KubeSphere | Shutdown ks-account] *******************************
skipping: [localhost]
TASK [common : KubeSphere | Deleting and backup old openldap svc] **************
skipping: [localhost]
TASK [common : KubeSphere | Checking openldap] *********************************
skipping: [localhost]
TASK [common : KubeSphere | Deploying openldap] ********************************
skipping: [localhost]
TASK [common : KubeSphere | Loading old openldap data] *************************
skipping: [localhost]
TASK [common : KubeSphere | Checking openldap-ha status] ***********************
skipping: [localhost]
TASK [common : KubeSphere | Getting openldap-ha pod list] **********************
skipping: [localhost]
TASK [common : KubeSphere | Getting old openldap data] *************************
skipping: [localhost]
TASK [common : KubeSphere | Migrating openldap data] ***************************
skipping: [localhost]
TASK [common : KubeSphere | Disabling old openldap] ****************************
skipping: [localhost]
TASK [common : KubeSphere | Restarting openldap] *******************************
skipping: [localhost]
TASK [common : KubeSphere | Restarting ks-account] *****************************
skipping: [localhost]
TASK [common : KubeSphere | Importing openldap status] *************************
skipping: [localhost]
TASK [common : KubeSphere | Getting minio installation files] ******************
skipping: [localhost] => (item=minio-ha)
TASK [common : KubeSphere | Creating manifests] ********************************
skipping: [localhost] => (item={'name': 'custom-values-minio', 'file': 'custom-values-minio.yaml'})
TASK [common : KubeSphere | Checking minio] ************************************
skipping: [localhost]
TASK [common : KubeSphere | Deploying minio] ***********************************
skipping: [localhost]
TASK [common : debug] **********************************************************
skipping: [localhost]
TASK [common : fail] ***********************************************************
skipping: [localhost]
TASK [common : KubeSphere | Importing minio status] ****************************
skipping: [localhost]
TASK [common : KubeSphere | Getting curator installation files] ****************
skipping: [localhost]
TASK [common : KubeSphere | Creating custom manifests] *************************
skipping: [localhost] => (item={'name': 'custom-values-elasticsearch-curator', 'file': 'custom-values-elasticsearch-curator.yaml'})
TASK [common : KubeSphere | Creating elasticsearch credentials secret] *********
skipping: [localhost]
TASK [common : KubeSphere | Getting Elasticsearch host] ************************
skipping: [localhost]
TASK [common : KubeSphere | Importing es status] *******************************
skipping: [localhost]
TASK [common : KubeSphere | Deploying elasticsearch-logging-curator] ***********
skipping: [localhost]
TASK [common : KubeSphere | Getting opensearch and curator installation files] ***
skipping: [localhost]
TASK [common : KubeSphere | Creating custom manifests] *************************
skipping: [localhost] => (item={'name': 'custom-values-opensearch-master', 'file': 'custom-values-opensearch-master.yaml'})
skipping: [localhost] => (item={'name': 'custom-values-opensearch-data', 'file': 'custom-values-opensearch-data.yaml'})
skipping: [localhost] => (item={'name': 'custom-values-opensearch-curator', 'file': 'custom-values-opensearch-curator.yaml'})
skipping: [localhost] => (item={'name': 'custom-values-opensearch-dashboard', 'file': 'custom-values-opensearch-dashboard.yaml'})
TASK [common : KubeSphere | Checking opensearch data StatefulSet] **************
skipping: [localhost]
TASK [common : KubeSphere | Checking opensearch storageclass] ******************
skipping: [localhost]
TASK [common : KubeSphere | Commenting opensearch storageclass parameter] ******
skipping: [localhost]
TASK [common : KubeSphere | Creating opensearch credentials secret] ************
skipping: [localhost]
TASK [common : KubeSphere | Checking internal opensearch] **********************
skipping: [localhost]
TASK [common : ks-logging | Debug opensearch_host] *****************************
skipping: [localhost]
TASK [common : KubeSphere | Deploying opensearch-logging] **********************
skipping: [localhost]
TASK [common : KubeSphere | Getting PersistentVolume Name] *********************
skipping: [localhost]
TASK [common : ks-logging | Debug opensearch_host] *****************************
skipping: [localhost]
TASK [common : KubeSphere | Patching PersistentVolume (persistentVolumeReclaimPolicy)] ***
skipping: [localhost]
TASK [common : KubeSphere | Deleting opensearch] *******************************
skipping: [localhost]
TASK [common : KubeSphere | Waiting for seconds] *******************************
skipping: [localhost]
TASK [common : KubeSphere | Deploying opensearch-logging] **********************
skipping: [localhost]
TASK [common : ks-logging | Debug opensearch_result] ***************************
skipping: [localhost]
TASK [common : KubeSphere | Importing opensearch status] ***********************
skipping: [localhost]
TASK [common : KubeSphere | Deploying opensearch-logging-curator] **************
skipping: [localhost]
TASK [common : KubeSphere | Deploying opensearch-dashboard] ********************
skipping: [localhost]
TASK [common : KubeSphere | Getting fluentbit installation files] **************
skipping: [localhost]
TASK [common : ks-logging | Getting Kubernetes Node info] **********************
skipping: [localhost]
TASK [common : ks-logging | Setting container runtime of kubernetes] ***********
skipping: [localhost]
TASK [common : ks-logging | Setting container runtime of kubernetes] ***********
skipping: [localhost]
TASK [common : ks-logging | Debug container_runtime] ***************************
skipping: [localhost]
TASK [common : ks-logging | Debug logging_container_runtime] *******************
skipping: [localhost]
TASK [common : KubeSphere | Creating custom manifests] *************************
skipping: [localhost] => (item={'path': 'fluentbit', 'file': 'custom-fluentbit-fluentBit.yaml'})
skipping: [localhost] => (item={'path': 'init', 'file': 'custom-fluentbit-operator-deployment.yaml'})
TASK [common : KubeSphere | Preparing fluentbit operator setup] ****************
skipping: [localhost]
TASK [common : KubeSphere | Deploying new fluentbit operator] ******************
skipping: [localhost]
TASK [common : KubeSphere | Importing fluentbit status] ************************
skipping: [localhost]
TASK [common : Setting persistentVolumeReclaimPolicy (mysql)] ******************
skipping: [localhost]
TASK [common : Setting persistentVolumeReclaimPolicy (etcd)] *******************
skipping: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=34 changed=24 unreachable=0 failed=0 skipped=119 rescued=0 ignored=0
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : Generating images list] ***************************************
skipping: [localhost]
TASK [download : Synchronizing images] *****************************************
TASK [kubesphere-defaults : KubeSphere | Setting images' namespace override] ***
skipping: [localhost]
TASK [kubesphere-defaults : KubeSphere | Configuring defaults] *****************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [ks-core/init-token : KubeSphere | Creating KubeSphere directory] *********
ok: [localhost]
TASK [ks-core/init-token : KubeSphere | Getting installation init files] *******
changed: [localhost] => (item=jwt-script)
TASK [ks-core/init-token : KubeSphere | Creating KubeSphere Secret] ************
changed: [localhost]
TASK [ks-core/init-token : KubeSphere | Creating KubeSphere Secret] ************
ok: [localhost]
TASK [ks-core/init-token : KubeSphere | Creating KubeSphere Secret] ************
skipping: [localhost]
TASK [ks-core/init-token : KubeSphere | Enabling Token Script] *****************
changed: [localhost]
TASK [ks-core/init-token : KubeSphere | Getting KubeSphere Token] **************
changed: [localhost]
TASK [ks-core/init-token : KubeSphere | Checking KubeSphere secrets] ***********
changed: [localhost]
TASK [ks-core/init-token : KubeSphere | Deleting KubeSphere secret] ************
skipping: [localhost]
TASK [ks-core/init-token : KubeSphere | Creating components token] *************
changed: [localhost]
TASK [ks-core/ks-core : KubeSphere | Setting Kubernetes version] ***************
ok: [localhost]
TASK [ks-core/ks-core : KubeSphere | Getting Kubernetes master num] ************
changed: [localhost]
TASK [ks-core/ks-core : KubeSphere | Setting master num] ***********************
ok: [localhost]
TASK [ks-core/ks-core : KubeSphere | Override master num] **********************
skipping: [localhost]
TASK [ks-core/ks-core : KubeSphere | Setting enableHA] *************************
ok: [localhost]
TASK [ks-core/ks-core : KubeSphere | Checking ks-core Helm Release] ************
changed: [localhost]
TASK [ks-core/ks-core : KubeSphere | Checking ks-core Exsit] *******************
changed: [localhost]
TASK [ks-core/ks-core : KubeSphere | Convert ks-core to helm mananged] *********
skipping: [localhost] => (item={'ns': 'kubesphere-controls-system', 'kind': 'serviceaccounts', 'resource': 'kubesphere-cluster-admin', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-controls-system', 'kind': 'serviceaccounts', 'resource': 'kubesphere-router-serviceaccount', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-controls-system', 'kind': 'role', 'resource': 'system:kubesphere-router-role', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-controls-system', 'kind': 'rolebinding', 'resource': 'nginx-ingress-role-nisa-binding', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-controls-system', 'kind': 'deployment', 'resource': 'default-http-backend', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-controls-system', 'kind': 'service', 'resource': 'default-http-backend', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'secrets', 'resource': 'ks-controller-manager-webhook-cert', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'serviceaccounts', 'resource': 'kubesphere', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'configmaps', 'resource': 'ks-console-config', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'configmaps', 'resource': 'ks-router-config', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'configmaps', 'resource': 'sample-bookinfo', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'clusterroles', 'resource': 'system:kubesphere-router-clusterrole', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'clusterrolebindings', 'resource': 'system:nginx-ingress-clusterrole-nisa-binding', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'clusterrolebindings', 'resource': 'system:kubesphere-cluster-admin', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'clusterrolebindings', 'resource': 'kubesphere', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'services', 'resource': 'ks-apiserver', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'services', 'resource': 'ks-console', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'services', 'resource': 'ks-controller-manager', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'deployments', 'resource': 'ks-apiserver', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'deployments', 'resource': 'ks-console', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'deployments', 'resource': 'ks-controller-manager', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'validatingwebhookconfigurations', 'resource': 'users.iam.kubesphere.io', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'validatingwebhookconfigurations', 'resource': 'resourcesquotas.quota.kubesphere.io', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'validatingwebhookconfigurations', 'resource': 'network.kubesphere.io', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'validatingwebhookconfigurations', 'resource': 'cluster.kubesphere.io', 'release': 'ks-core'})
skipping: [localhost] => (item={'ns': 'kubesphere-system', 'kind': 'users.iam.kubesphere.io', 'resource': 'admin', 'release': 'ks-core'})
TASK [ks-core/ks-core : KubeSphere | Patch admin user] *************************
changed: [localhost]
TASK [ks-core/ks-core : KubeSphere | Getting ks-core helm charts] **************
changed: [localhost] => (item=ks-core)
TASK [ks-core/ks-core : KubeSphere | Checking KubeSphere Admin User] ***********
changed: [localhost]
TASK [ks-core/ks-core : set_fact] **********************************************
skipping: [localhost]
TASK [ks-core/ks-core : shell] *************************************************
skipping: [localhost]
TASK [ks-core/ks-core : KubeSphere | Creating manifests] ***********************
changed: [localhost] => (item={'path': 'ks-core', 'file': 'custom-values-ks-core.yaml'})
TASK [ks-core/ks-core : KubeSphere | Upgrade CRDs] *****************************
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/alerting.kubesphere.io_clusterrulegroups.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/alerting.kubesphere.io_globalrulegroups.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/alerting.kubesphere.io_rulegroups.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/app_v1beta1_application.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/application.kubesphere.io_helmapplications.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/application.kubesphere.io_helmapplicationversions.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/application.kubesphere.io_helmcategories.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/application.kubesphere.io_helmreleases.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/application.kubesphere.io_helmrepos.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/cluster.kubesphere.io_clusters.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/gateway.kubesphere.io_gateways.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/gateway.kubesphere.io_nginxes.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_federatedrolebindings.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_federatedroles.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_federatedusers.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_globalrolebindings.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_globalroles.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_groupbindings.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_groups.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_loginrecords.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_rolebases.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_users.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_workspacerolebindings.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/iam.kubesphere.io_workspaceroles.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/network.kubesphere.io_ipamblocks.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/network.kubesphere.io_ipamhandles.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/network.kubesphere.io_ippools.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/network.kubesphere.io_namespacenetworkpolicies.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/quota.kubesphere.io_resourcequotas.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/servicemesh.kubesphere.io_servicepolicies.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/servicemesh.kubesphere.io_strategies.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/storage.kubesphere.io_storageclasseraccessor.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/tenant.kubesphere.io_workspaces.yaml)
changed: [localhost] => (item=/kubesphere/kubesphere/ks-core/crds/tenant.kubesphere.io_workspacetemplates.yaml)
TASK [ks-core/ks-core : KubeSphere | Creating ks-core] *************************
changed: [localhost]
TASK [ks-core/ks-core : KubeSphere | Creating manifests] ***********************
changed: [localhost] => (item={'path': 'ks-core', 'file': 'ks-upgrade.yaml'})
TASK [ks-core/ks-core : Kubesphere | Checking Users Manger and Workspaces Manger] ***
changed: [localhost]
TASK [ks-core/ks-core : Kubesphere | Checking migration job] *******************
skipping: [localhost]
TASK [ks-core/ks-core : KubeSphere | Creating migration job] *******************
skipping: [localhost]
TASK [ks-core/ks-core : KubeSphere | Importing ks-core status] *****************
FAILED - RETRYING: KubeSphere | Importing ks-core status (5 retries left).
FAILED - RETRYING: KubeSphere | Importing ks-core status (4 retries left).
FAILED - RETRYING: KubeSphere | Importing ks-core status (3 retries left).
FAILED - RETRYING: KubeSphere | Importing ks-core status (2 retries left).
FAILED - RETRYING: KubeSphere | Importing ks-core status (1 retries left).
fatal: [localhost]: FAILED! => {"attempts": 5, "changed": true, "cmd": "/usr/local/bin/kubectl patch cc ks-installer --type merge -p '{\"status\": {\"core\": {\"status\": \"enabled\", \"enabledTime\": \"2023-11-16T15:56:36CST\"}}}' -n kubesphere-system\n", "delta": "0:00:00.149733", "end": "2023-11-16 15:56:54.795204", "failed_when_result": true, "msg": "non-zero return code", "rc": 1, "start": "2023-11-16 15:56:54.645471", "stderr": "Error from server (NotFound): configconstraints.apps.kubeblocks.io \"ks-installer\" not found", "stderr_lines": ["Error from server (NotFound): configconstraints.apps.kubeblocks.io \"ks-installer\" not found"], "stdout": "", "stdout_lines": []}
PLAY RECAP *********************************************************************
localhost : ok=23 changed=17 unreachable=0 failed=1 skipped=11 rescued=0 ignored=0
情况说明:
其最初错误为 Error from server (Forbidden): configconstraints.apps.kubeblocks.io "ks-installer" is forbidden: User "system:serviceaccount:kubesphere-system:ks-installer" cannot get resource "configconstraints" in API group "apps.kubeblocks.io" at the cluster scope
后半部分问题比较明确,于是对, ks-installer 的 clusterrole 增加:
- apiGroups:
- apps.kubeblocks.io
resources:
- '*'
verbs:
- '*'
增加后,上述部分问题得到缓解,重新部署 ks-installer 后报错如上日志为Error from server (NotFound): configconstraints.apps.kubeblocks.io "ks-installer" not found
集群有安装 kubeblocks ,但是如上述日志不知道为什么这个属于 kubeblocks 的 crd 对 ks-installer 造成了影响,望得到解决方案,谢谢各位大佬。