部署kubesphere报错

安装kubesphere报错命名空间terminted

[root@k8smaster ~]# kubectl apply -f kubesphere-installer.yaml
Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
customresourcedefinition.apiextensions.k8s.io/clusterconfigurations.installer.kubesphere.io created
namespace/kubesphere-system created
serviceaccount/ks-installer created
clusterrole.rbac.authorization.k8s.io/ks-installer created
clusterrolebinding.rbac.authorization.k8s.io/ks-installer created
deployment.apps/ks-installer created
[root@k8smaster ~]# kubectl apply -f cluster-configuration.yaml
clusterconfiguration.installer.kubesphere.io/ks-installer created

查看日志

[root@k8smaster ~]# kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
2024-06-06T17:43:51+08:00 INFO     : shell-operator latest
2024-06-06T17:43:51+08:00 INFO     : HTTP SERVER Listening on 0.0.0.0:9115
2024-06-06T17:43:51+08:00 INFO     : Use temporary dir: /tmp/shell-operator
2024-06-06T17:43:51+08:00 INFO     : Initialize hooks manager ...
2024-06-06T17:43:51+08:00 INFO     : Search and load hooks ...
2024-06-06T17:43:51+08:00 INFO     : Load hook config from '/hooks/kubesphere/installRunner.py'
2024-06-06T17:43:57+08:00 INFO     : Load hook config from '/hooks/kubesphere/schedule.sh'
2024-06-06T17:43:57+08:00 INFO     : Initializing schedule manager ...
2024-06-06T17:43:57+08:00 INFO     : KUBE Init Kubernetes client
2024-06-06T17:43:57+08:00 INFO     : KUBE-INIT Kubernetes client is configured successfully
2024-06-06T17:43:57+08:00 INFO     : MAIN: run main loop
2024-06-06T17:43:57+08:00 INFO     : MAIN: add onStartup tasks
2024-06-06T17:43:57+08:00 INFO     : QUEUE add all HookRun@OnStartup
2024-06-06T17:43:57+08:00 INFO     : MSTOR Create new metric shell_operator_live_ticks
2024-06-06T17:43:57+08:00 INFO     : MSTOR Create new metric shell_operator_tasks_queue_length
2024-06-06T17:43:57+08:00 INFO     : Running schedule manager ...
2024-06-06T17:43:57+08:00 INFO     : GVR for kind 'ClusterConfiguration' is installer.kubesphere.io/v1alpha1, Resource=clusterconfigurations
2024-06-06T17:43:57+08:00 INFO     : EVENT Kube event '4584ffb1-b26e-467d-a8a4-c8e8248228d6'
2024-06-06T17:43:57+08:00 INFO     : QUEUE add TASK_HOOK_RUN@KUBE_EVENTS kubesphere/installRunner.py
2024-06-06T17:44:00+08:00 INFO     : TASK_RUN HookRun@KUBE_EVENTS kubesphere/installRunner.py
2024-06-06T17:44:00+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 : include_tasks] ************************************************
skipping: [localhost]TASK [download : Downloading items] ********************************************
skipping: [localhost]TASK [download : Synchronizing container] **************************************
skipping: [localhost]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 | Checking Kubernetes version] *******************
changed: [localhost]TASK [preinstall : KubeSphere | Initing Kubernetes version] ********************
ok: [localhost]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 | Checking KubeSphere component] *****************
changed: [localhost]TASK [preinstall : KubeSphere | Getting KubeSphere component version] **********
skipping: [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=8    changed=4    unreachable=0    failed=0    skipped=7    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 : include_tasks] ************************************************
skipping: [localhost]TASK [download : Downloading items] ********************************************
skipping: [localhost]TASK [download : Synchronizing container] **************************************
skipping: [localhost]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 : 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 : Metrics-Server | Uninstalling old metrics-server] *******
skipping: [localhost]TASK [metrics-server : Metrics-Server | Installing new metrics-server] *********
skipping: [localhost]TASK [metrics-server : Metrics-Server | Waitting for metrics.k8s.io ready] *****
skipping: [localhost]TASK [metrics-server : Metrics-Server | Importing metrics-server status] *******
skipping: [localhost]PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=11   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 : include_tasks] ************************************************
skipping: [localhost]TASK [download : Downloading items] ********************************************
skipping: [localhost]TASK [download : Synchronizing container] **************************************
skipping: [localhost]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","istio-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=istio-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=istio-system)
changed: [localhost] => (item=istio-system)TASK [common : KubeSphere | Creating ImagePullSecrets] *************************
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)
failed: [localhost] (item=kubesphere-logging-system) => {"ansible_loop_var": "item", "changed": true, "cmd": "cat <<EOF | kubectl apply -f -\n  apiVersion: v1\n  kind: Secret\n  metadata:\n    name: qingcloud\n    namespace: \"kubesphere-logging-system\"\n  data:\n    .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXJodWIucWluZ2Nsb3VkLmNvbSI6eyJhdXRoIjoiWjNWbGMzUTZaM1ZsYzNRPSJ9fX0=\n  type: kubernetes.io/dockerconfigjson\nEOF\n", "delta": "0:00:00.504699", "end": "2024-06-06 17:45:00.569030", "item": "kubesphere-logging-system", "msg": "non-zero return code", "rc": 1, "start": "2024-06-06 17:45:00.064331", "stderr": "Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace kubesphere-logging-system because it is being terminated", "stderr_lines": ["Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace kubesphere-logging-system because it is being terminated"], "stdout": "", "stdout_lines": []}
failed: [localhost] (item=istio-system) => {"ansible_loop_var": "item", "changed": true, "cmd": "cat <<EOF | kubectl apply -f -\n  apiVersion: v1\n  kind: Secret\n  metadata:\n    name: qingcloud\n    namespace: \"istio-system\"\n  data:\n    .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXJodWIucWluZ2Nsb3VkLmNvbSI6eyJhdXRoIjoiWjNWbGMzUTZaM1ZsYzNRPSJ9fX0=\n  type: kubernetes.io/dockerconfigjson\nEOF\n", "delta": "0:00:00.530170", "end": "2024-06-06 17:45:01.779233", "item": "istio-system", "msg": "non-zero return code", "rc": 1, "start": "2024-06-06 17:45:01.249063", "stderr": "Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace istio-system because it is being terminated", "stderr_lines": ["Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace istio-system because it is being terminated"], "stdout": "", "stdout_lines": []}
failed: [localhost] (item=istio-system) => {"ansible_loop_var": "item", "changed": true, "cmd": "cat <<EOF | kubectl apply -f -\n  apiVersion: v1\n  kind: Secret\n  metadata:\n    name: qingcloud\n    namespace: \"istio-system\"\n  data:\n    .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXJodWIucWluZ2Nsb3VkLmNvbSI6eyJhdXRoIjoiWjNWbGMzUTZaM1ZsYzNRPSJ9fX0=\n  type: kubernetes.io/dockerconfigjson\nEOF\n", "delta": "0:00:00.445114", "end": "2024-06-06 17:45:02.714422", "item": "istio-system", "msg": "non-zero return code", "rc": 1, "start": "2024-06-06 17:45:02.269308", "stderr": "Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace istio-system because it is being terminated", "stderr_lines": ["Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace istio-system because it is being terminated"], "stdout": "", "stdout_lines": []}PLAY RECAP *********************************************************************
localhost                  : ok=7    changed=3    unreachable=0    failed=1    skipped=4    rescued=0    ignored=02024-06-07T09:52:30+08:00 INFO     : EVENT Kube event '4584ffb1-b26e-467d-a8a4-c8e8248228d6'
2024-06-07T09:52:30+08:00 INFO     : QUEUE add TASK_HOOK_RUN@KUBE_EVENTS kubesphere/installRunner.py
2024-06-07T09:52:31+08:00 INFO     : TASK_RUN HookRun@KUBE_EVENTS kubesphere/installRunner.py
2024-06-07T09:52:31+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 : include_tasks] ************************************************
skipping: [localhost]TASK [download : Downloading items] ********************************************
skipping: [localhost]TASK [download : Synchronizing container] **************************************
skipping: [localhost]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 | Checking Kubernetes version] *******************
changed: [localhost]TASK [preinstall : KubeSphere | Initing Kubernetes version] ********************
ok: [localhost]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 | Checking KubeSphere component] *****************
changed: [localhost]TASK [preinstall : KubeSphere | Getting KubeSphere component version] **********
skipping: [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=8    changed=4    unreachable=0    failed=0    skipped=7    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 : include_tasks] ************************************************
skipping: [localhost]TASK [download : Downloading items] ********************************************
skipping: [localhost]TASK [download : Synchronizing container] **************************************
skipping: [localhost]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 : 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 : Metrics-Server | Uninstalling old metrics-server] *******
skipping: [localhost]TASK [metrics-server : Metrics-Server | Installing new metrics-server] *********
skipping: [localhost]TASK [metrics-server : Metrics-Server | Waitting for metrics.k8s.io ready] *****
skipping: [localhost]TASK [metrics-server : Metrics-Server | Importing metrics-server status] *******
skipping: [localhost]PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=11   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 : include_tasks] ************************************************
skipping: [localhost]TASK [download : Downloading items] ********************************************
skipping: [localhost]TASK [download : Synchronizing container] **************************************
skipping: [localhost]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","istio-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=istio-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=istio-system)
changed: [localhost] => (item=istio-system)TASK [common : KubeSphere | Creating ImagePullSecrets] *************************
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)
failed: [localhost] (item=kubesphere-logging-system) => {"ansible_loop_var": "item", "changed": true, "cmd": "cat <<EOF | kubectl apply -f -\n  apiVersion: v1\n  kind: Secret\n  metadata:\n    name: qingcloud\n    namespace: \"kubesphere-logging-system\"\n  data:\n    .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXJodWIucWluZ2Nsb3VkLmNvbSI6eyJhdXRoIjoiWjNWbGMzUTZaM1ZsYzNRPSJ9fX0=\n  type: kubernetes.io/dockerconfigjson\nEOF\n", "delta": "0:00:00.539907", "end": "2024-06-07 09:53:31.003414", "item": "kubesphere-logging-system", "msg": "non-zero return code", "rc": 1, "start": "2024-06-07 09:53:30.463507", "stderr": "Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace kubesphere-logging-system because it is being terminated", "stderr_lines": ["Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace kubesphere-logging-system because it is being terminated"], "stdout": "", "stdout_lines": []}
failed: [localhost] (item=istio-system) => {"ansible_loop_var": "item", "changed": true, "cmd": "cat <<EOF | kubectl apply -f -\n  apiVersion: v1\n  kind: Secret\n  metadata:\n    name: qingcloud\n    namespace: \"istio-system\"\n  data:\n    .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXJodWIucWluZ2Nsb3VkLmNvbSI6eyJhdXRoIjoiWjNWbGMzUTZaM1ZsYzNRPSJ9fX0=\n  type: kubernetes.io/dockerconfigjson\nEOF\n", "delta": "0:00:00.565095", "end": "2024-06-07 09:53:31.998505", "item": "istio-system", "msg": "non-zero return code", "rc": 1, "start": "2024-06-07 09:53:31.433410", "stderr": "Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace istio-system because it is being terminated", "stderr_lines": ["Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace istio-system because it is being terminated"], "stdout": "", "stdout_lines": []}
failed: [localhost] (item=istio-system) => {"ansible_loop_var": "item", "changed": true, "cmd": "cat <<EOF | kubectl apply -f -\n  apiVersion: v1\n  kind: Secret\n  metadata:\n    name: qingcloud\n    namespace: \"istio-system\"\n  data:\n    .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXJodWIucWluZ2Nsb3VkLmNvbSI6eyJhdXRoIjoiWjNWbGMzUTZaM1ZsYzNRPSJ9fX0=\n  type: kubernetes.io/dockerconfigjson\nEOF\n", "delta": "0:00:00.481929", "end": "2024-06-07 09:53:32.971047", "item": "istio-system", "msg": "non-zero return code", "rc": 1, "start": "2024-06-07 09:53:32.489118", "stderr": "Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace istio-system because it is being terminated", "stderr_lines": ["Error from server (Forbidden): error when creating \"STDIN\": secrets \"qingcloud\" is forbidden: unable to create new content in namespace istio-system because it is being terminated"], "stdout": "", "stdout_lines": []}PLAY RECAP *********************************************************************
localhost                  : ok=7    changed=3    unreachable=0    failed=1    skipped=4    rescued=0    ignored=0

报错显示
secrets “qingcloud” is forbidden: unable to create new content in namespace istio-system because it is being terminated", “stderr_lines”: [“Error from server (Forbidden): error when creating “STDIN”: secrets “qingcloud” is forbidden: unable to create new content in namespace istio-system because it is being terminated”], “stdout”: “”, “stdout_lines”: []
翻译一下:是因为创建命名空间istio-system报错,因为他的状态是terminated 结束:终止状态,

查看命名空间
[root@k8smaster ~]# kubectl get ns
NAME                              STATUS        AGE
default                           Active        176d
ingress-nginx                     Active        167d
istio-system                      Terminating   120d
kube-node-lease                   Active        176d
kube-public                       Active        176d
kube-system                       Active        176d
kubeedge                          Active        120d
kubesphere-controls-system        Active        120d
kubesphere-devops-system          Active        120d
kubesphere-logging-system         Terminating   120d
kubesphere-monitoring-federated   Active        120d
kubesphere-monitoring-system      Active        16h
kubesphere-system                 Active        16h
[root@k8smaster ~]# kubectl delete ns istio-system
namespace "istio-system" deleted
^C
[root@k8smaster ~]# kubectl get pod -n istio-system
No resources found in istio-system namespace.
[root@k8smaster ~]# kubectl get ns istio-system -o json>istio-system.json
[root@k8smaster ~]# vi istio-system.json

在这里插入图片描述
删除里面框起来的字段

 "spec": {"finalizers": ["kubernetes"]},
[root@k8smaster ~]# kubectl proxy --port=8081
Starting to serve on 127.0.0.1:8081

重新开启一个终端,执行

[root@k8smaster ~]# curl -k -H "Content-Type: application/json" -X PUT --data-binary @istio-system.json http://127.0.0.1:8081/api/v1/namespaces/istio-system/finalize
{"kind": "Namespace","apiVersion": "v1","metadata": {"name": "istio-system","selfLink": "/api/v1/namespaces/istio-system/finalize","uid": "e4d5e8c7-04ac-49ef-9de9-63aad0dc0bac","resourceVersion": "2854048","creationTimestamp": "2024-02-07T02:27:46Z","deletionTimestamp": "2024-02-21T02:09:23Z","labels": {"istio-injection": "disabled","kubesphere.io/namespace": "istio-system","kubesphere.io/workspace": "system-workspace"},"managedFields": [{"manager": "kubectl","operation": "Update","apiVersion": "v1","time": "2024-02-07T03:43:47Z","fieldsType": "FieldsV1","fieldsV1": {"f:metadata":{"f:labels":{".":{},"f:istio-injection":{},"f:kubesphere.io/namespace":{},"f:kubesphere.io/workspace":{}}},"f:status":{"f:phase":{}}}},{"manager": "kube-controller-manager","operation": "Update","apiVersion": "v1","time": "2024-02-21T02:09:33Z","fieldsType": "FieldsV1","fieldsV1": {"f:status":{"f:conditions":{".":{},"k:{\"type\":\"NamespaceContentRemaining\"}":{".":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"NamespaceDeletionContentFailure\"}":{".":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"NamespaceDeletionDiscoveryFailure\"}":{".":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"NamespaceDeletionGroupVersionParsingFailure\"}":{".":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"NamespaceFinalizersRemaining\"}":{".":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}}}}}]},"spec": {},"status": {"phase": "Terminating","conditions": [{"type": "NamespaceDeletionDiscoveryFailure","status": "False","lastTransitionTime": "2024-06-07T00:39:58Z","reason": "ResourcesDiscovered","message": "All resources successfully discovered"},{"type": "NamespaceDeletionGroupVersionParsingFailure","status": "False","lastTransitionTime": "2024-02-21T02:09:33Z","reason": "ParsedGroupVersions","message": "All legacy kube types successfully parsed"},{"type": "NamespaceDeletionContentFailure","status": "False","lastTransitionTime": "2024-02-21T02:09:33Z","reason": "ContentDeleted","message": "All content successfully deleted, may be waiting on finalization"},{"type": "NamespaceContentRemaining","status": "True","lastTransitionTime": "2024-02-21T02:09:33Z","reason": "SomeResourcesRemain","message": "Some resources are remaining: kialis.kiali.io has 1 resource instances"},{"type": "NamespaceFinalizersRemaining","status": "True","lastTransitionTime": "2024-02-21T02:09:33Z","reason": "SomeFinalizersRemain","message": "Some content in the namespace has finalizers remaining: finalizer.kiali in 1 resource instances"}]}
}

查看命名空间istio-system命名空间已经被删除

[root@k8smaster ~]# kubectl get ns
NAME                              STATUS        AGE
default                           Active        176d
ingress-nginx                     Active        167d
kube-node-lease                   Active        176d
kube-public                       Active        176d
kube-system                       Active        176d
kubeedge                          Active        120d
kubesphere-controls-system        Active        121d
kubesphere-devops-system          Active        121d
kubesphere-logging-system         Terminating   121d
kubesphere-monitoring-federated   Active        121d
kubesphere-monitoring-system      Active        17h
kubesphere-system                 Active        17h

再删除kubesphere-logging-system

[root@k8smaster ~]# kubectl get ns kubesphere-logging-system -o json > logging.json
[root@k8smaster ~]# vi logging.json
#删除里面内容"finalizers": ["kubernetes"]

执行

[root@k8smaster ~]#curl -k -H "Content-Type: application/json" -X PUT --data-binary @logging.json http://127.0.0.1:8081/api/v1/namespaces/kubesphere-logging-system/finalize

查看已经被删除

[root@k8smaster ~]# kubectl get ns
NAME                              STATUS   AGE
default                           Active   176d
ingress-nginx                     Active   167d
kube-node-lease                   Active   176d
kube-public                       Active   176d
kube-system                       Active   176d
kubeedge                          Active   120d
kubesphere-controls-system        Active   121d
kubesphere-devops-system          Active   121d
kubesphere-monitoring-federated   Active   121d
kubesphere-monitoring-system      Active   17h
kubesphere-system                 Active   17h

已解决

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/23842.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

618科技好物清单:物超所值的产品推荐,总有一款适合你!

随着科技的不断发展&#xff0c;我们生活中涌现出了越来越多的科技创新产品。这些产品不仅让我们的生活变得更加便捷&#xff0c;还提升了我们的生活品质。而在即将到来的618购物节&#xff0c;正是我们购买这些物超所值科技好物的绝佳时机。 本文将为您推荐一些在618期间值得关…

英伟达的数字孪生地球是什么

1 英伟达的数字孪生地球 Earth-2是一个全栈式开放平台&#xff0c;包含&#xff1a;ICON 和 IFS 等数值模型的物理模拟&#xff1b;多种机器学习模型&#xff0c;例如 FourCastNet、GraphCast 和通过 NVIDIA Modulus 实现的深度学习天气预测 (DLWP)&#xff1b;以及通过 NVIDI…

手撕设计模式——克隆对象之原型模式

1.业务需求 ​ 大家好&#xff0c;我是菠菜啊&#xff0c;前俩天有点忙&#xff0c;今天继续更新了。今天给大家介绍克隆对象——原型模式。老规矩&#xff0c;在介绍这期之前&#xff0c;我们先来看看这样的需求&#xff1a;《西游记》中每次孙悟空拔出一撮猴毛吹一下&#x…

pytorch-nn.Module

目录 1. nn.Module2. nn.Sequential容器3. 网络参数parameters4. Modules内部管理5. checkpoint6. train/test状态切换6. 实现自己的网络层6.1 实现打平操作6.2 实现自己的线性层 7. 代码 1. nn.Module 是所有nn.类的父类&#xff0c;其中包括nn.Linear nn.BatchNorm2d nn.Con…

肺结节14问,查出肺结节怎么办?哪些能用中医调治消散?快来了解一下吧

近些年&#xff0c;随着大众防癌意识的加强&#xff0c;和胸部低剂量CT的普及&#xff0c;肺结节的检出率也逐年升高&#xff0c;不少患者CT报告上&#xff0c;写着“肺小结”“肺部磨玻璃结节”的字样&#xff0c;当你看到这几个字时&#xff0c;会不会瞬间紧张起来&#xff1…

编程规范-代码检测-格式化-规范化提交

适用于vue项目的编程规范 – 在多人开发时统一编程规范至关重要 1、代码检测 --Eslint Eslint&#xff1a;一个插件化的 javascript 代码检测工具 在 .eslintrc.js 文件中进行配置 // ESLint 配置文件遵循 commonJS 的导出规则&#xff0c;所导出的对象就是 ESLint 的配置对…

简化电动汽车充电器和光伏逆变器的高压电流检测

在任何电气系统中&#xff0c;电流都是一个至关重要的参数。电动汽车 (EV) 充电系统和太阳能系统都需要检测电流的大小&#xff0c;以便控制和监测功率转换、充电和放电。电流传感器通过监测分流电阻器上的压降或导体中电流产生的磁场来测量电流。 金属氧化物半导体场效应晶体…

DBeaver连接MySQL提示“Public Key Retrieval is not allowed“问题的解决方式

问题描述 客户端root用户连接数据库出现出现Public Key Retrieval is not allowed 原因分析&#xff1a; 加上allowPublicKeyRetrievalfalse&#xff1a; 解决方案&#xff1a; allowPublicKeyRetrievaltrue&#xff1a;

Java Web学习笔记14——BOM对象

BOM&#xff1a; 概念&#xff1a;浏览器对象模型&#xff08;Browser Object Model&#xff09;&#xff0c;允许JavaScript与浏览器对话&#xff0c;JavaScript将浏览器的各个组成部分封装为对象。 组成&#xff1a; Window&#xff1a;浏览器窗口对象 介绍&#xff1a;浏览…

光伏电站鸟害解决方案,列式冲击波声压光伏驱鸟器

光伏电站的运营过程中&#xff0c;最怕遇上鸟粪污染。鸟粪不仅难以清洗&#xff0c;还可能导致光伏组件损坏、降低发电效率。因此&#xff0c;制定并实施有效的驱鸟策略对于光伏电站的稳定运营至关重要。 针对光伏电站的鸟害问题&#xff0c;我们可以从以下几个方面来解决&…

知名优秀定制线缆生产源头工厂推荐-精工电联:全程跟踪监制,打造水下机器人线缆定制新标杆

在科技飞速发展的今天&#xff0c;精工电联作为高科技智能化产品及自动化设备专用连接线束和连接器配套服务商&#xff0c;始终站在行业前沿。我们专注于为高科技行业提供高品质、优匹配的集成线缆和连接器定制服务&#xff0c;特别是在水下机器人线缆定制领域&#xff0c;通过…

sql死锁分析

一、重要参数 获取事务信息:SELECT * FROM information_schema.INNODB_TRX; 获取锁等待:SELECT * FROM information_schema.INNODB_LOCK_WAITS; 查看锁信息:SELECT * FROM information_schema.INNODB_LOCKS WHERE lock_trx_id IN () 二、case1:间隙锁和x锁互斥导致死锁 1、背景…

大厂AI团战高考作文,华师一附中特级教师这样打分

在人工智能的浪潮中&#xff0c; 人们不禁疑问&#xff1a; AI真的能超越人类吗&#xff1f; 这究竟是现实还是幻想&#xff1f; 我们将目睹一场前所未有的较量&#xff1a; 百度文心一言、阿里通义千问、 腾讯混元、字节豆包 四家国内顶尖互联网企业 精心打造的AI大模…

HBM简介

1、什么是HBM HBMHigh Bandwidth Memory 是一种用于某些 GPU的 3D 堆叠 DRAM存储器 &#xff08;动态随机存取存储器&#xff09;以及服务器、高性能计算 &#xff08;HPC&#xff09; 、网络连接的内存接口。其实就是将很多个DDR芯片堆叠在一起后和GPU封装在一起&#xff0c;实…

ROS socketcan_bridge使用说明

ROS socketcan_bridge使用说明&#xff08;以ubuntu20.04为例&#xff09; socketcan_bridge是什么 ROS针对socketcan提供了三个层次的驱动库&#xff0c;分别是ros_canopen&#xff0c;socketcan_bridge和socketcan_interface。 socketcan_interface&#xff1a; 功能&#x…

政安晨【零基础玩转各类开源AI项目】:解析开源项目:Champ 利用三维参数指导制作可控且一致的人体图像动画

目录 论文题目 Champ: 利用三维参数指导制作可控且一致的人体图像动画 安装 创建 conda 环境&#xff1a; 使用 pip 安装软件包 推理 1. 下载预训练模型 2. 准备准备引导动作数据 运行推理 训练模型 准备数据集 运行训练脚本 数据集 政安晨的个人主页&#xff1a;…

工业无线通信解决方案,企业在进行智能化升级改造

某大型制造企业在进行智能化升级改造,需要将分布在各个车间的数控机床、自动化生产线、AGV小车等设备连接到云端,实现设备的远程监控、数据采集分析等功能。之前工厂内部是用工业以太网连接,存在布线难、成本高、灵活性差等问题。 在了解客户需求后,我司星创易联的工程师建议客…

淘宝扭蛋机小程序,扭蛋市场创新模式

扭蛋机作为潮玩市场的娱乐消费方式&#xff0c;成为了当下消费者的新宠。扭蛋机凭借自身性价比高、商品多样、惊喜性等特点&#xff0c;吸引了各个年龄层的消费者&#xff0c;不仅年轻人喜欢&#xff0c;不少小学生和老年人也非常喜欢&#xff0c;扭蛋机市场迎来了快速发展期。…

简单聊下办公白环境

在当今信息化时代&#xff0c;办公环境对于工作效率和员工满意度有着至关重要的影响。而白名单作为一种网络安全策略&#xff0c;其是否适合办公环境&#xff0c;成为了许多企业和组织需要思考的问题。本文将从白名单的定义、特点及其在办公环境中的应用等方面&#xff0c;探讨…

NRP-Z81探头NRP-Z85功率传感器NRP-Z86罗德与施瓦茨

精确和简单的功率测量重要的特点是高测量精度和速度。紧凑、坚固的R&SNRX基本单元&#xff0c;带彩色触摸显示屏&#xff0c;支持多达四个R&SNRP功率传感器和所有传感器相关测量功能。测量值以数字或图形方式显示&#xff0c;具体取决于测量功能。高分辨率图形用户界面…