部署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.pswp.cn/web/23842.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/23842.shtml
英文地址,請注明出處:http://en.pswp.cn/web/23842.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

618科技好物清單:物超所值的產品推薦,總有一款適合你!

隨著科技的不斷發展&#xff0c;我們生活中涌現出了越來越多的科技創新產品。這些產品不僅讓我們的生活變得更加便捷&#xff0c;還提升了我們的生活品質。而在即將到來的618購物節&#xff0c;正是我們購買這些物超所值科技好物的絕佳時機。 本文將為您推薦一些在618期間值得關…

軟光敏的程序實現

軟光敏的程序實現通常涉及到使用攝像頭或其他圖像捕捉設備的內部sensor來感應環境光線&#xff0c;并結合軟件算法來控制補光燈或其他相關設備的開關。以下是一個簡化的軟光敏程序實現的示例流程&#xff0c;使用偽代碼來描述&#xff1a; pseudo 初始化攝像頭 while 攝像頭開…

每天一個數據分析題(三百五十五)-業務分析報告

業務分析報告的主要作用是將業務分析報表中發現的業務問題進行匯總說明&#xff0c;并進一步提出解決問題的建議&#xff0c;以幫助閱讀者做出正確的決策判斷。業務分析報告撰寫的注意事項中正確的是&#xff1f; A. 條理清晰、結構完整 B. 論點明確 C. 圖、表、文字相結合 …

英偉達的數字孿生地球是什么

1 英偉達的數字孿生地球 Earth-2是一個全棧式開放平臺&#xff0c;包含&#xff1a;ICON 和 IFS 等數值模型的物理模擬&#xff1b;多種機器學習模型&#xff0c;例如 FourCastNet、GraphCast 和通過 NVIDIA Modulus 實現的深度學習天氣預測 (DLWP)&#xff1b;以及通過 NVIDI…

Go理論-面試題

面向對象&#xff1f; 面向對象是一種方法論。一種非常實用的系統化軟件開發方法。 三大特點&#xff1a;封裝、繼承、多態 Go和Java的區別 Go不允許重載&#xff0c;Java允許Java允許多態&#xff0c;Go沒有&#xff08;但可以通過接口實現&#xff09;Go語言的繼承通過匿…

手撕設計模式——克隆對象之原型模式

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…

每日一練 - OSPF協議驗證機制

01 真題題目 OSPF 只有在 Hello 報文中有驗證信息,OSPF 支持 MD5 密文驗證. A.正確 B.錯誤 02 真題答案 B 03 答案解析 這個陳述是不完全正確的。首先&#xff0c;OSPF確實使用Hello報文來攜帶認證信息&#xff0c;但這不意味著只有Hello報文包含驗證信息。 OSPF的認證機制可…

政府績效考核第三方評估的含義

政府績效考核第三方評估是指由獨立于政府的外部機構&#xff08;如專業評估公司、研究機構或非政府組織&#xff09;對政府部門或其下屬單位的績效進行客觀、公正、系統的評估。其主要目的是通過引入獨立的第三方評估機構&#xff0c;對政府績效進行科學、全面的考核&#xff0…

【AIGC調研系列】Qwen2與llama3對比的優勢

Qwen2與Llama3的對比中&#xff0c;Qwen2展現出了多方面的優勢。首先&#xff0c;從性能角度來看&#xff0c;Qwen2在多個基準測試中表現出色&#xff0c;尤其是在代碼和數學能力上有顯著提升[1][9]。此外&#xff0c;Qwen2還在自然語言理解、知識、多語言等多項能力上均顯著超…

肺結節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;瀏覽…

opencv銳化卷積核的定義和應用(圖像銳化)。

定義銳化卷積核 卷積核&#xff08;Kernel&#xff09;是一個小矩陣&#xff0c;它用于在圖像處理操作中&#xff0c;比如模糊、銳化、邊緣檢測等。卷積核通過卷積操作應用于圖像像素&#xff0c;產生新的圖像。 在銳化操作中&#xff0c;我們通常使用一個 3x3 的卷積核。以下…

注解 - @RestController

注解簡介 在今天的每日一注解中&#xff0c;我們將探討RestController注解。RestController是Spring框架中的一個組合注解&#xff0c;方便創建RESTful Web服務。 注解定義 RestController注解是Controller和ResponseBody注解的組合&#xff0c;用于定義RESTful控制器。以下是…

物聯網(IoT)及物聯網網絡協議面試題及參考答案(2萬字長文)

什么是物聯網(IoT)? 物聯網(Internet of Things,簡稱IoT)是一個由互聯網、傳統電信網、傳感器網絡等多種網絡組成的網絡概念。它允許物體與物體、物體與人、人與人之間通過智能傳感器、軟件和網絡進行信息交換和通信,實現智能化識別、定位、跟蹤、監控和管理。物聯網的…

光伏電站鳥害解決方案,列式沖擊波聲壓光伏驅鳥器

光伏電站的運營過程中&#xff0c;最怕遇上鳥糞污染。鳥糞不僅難以清洗&#xff0c;還可能導致光伏組件損壞、降低發電效率。因此&#xff0c;制定并實施有效的驅鳥策略對于光伏電站的穩定運營至關重要。 針對光伏電站的鳥害問題&#xff0c;我們可以從以下幾個方面來解決&…

知名優秀定制線纜生產源頭工廠推薦-精工電聯:全程跟蹤監制,打造水下機器人線纜定制新標桿

在科技飛速發展的今天&#xff0c;精工電聯作為高科技智能化產品及自動化設備專用連接線束和連接器配套服務商&#xff0c;始終站在行業前沿。我們專注于為高科技行業提供高品質、優匹配的集成線纜和連接器定制服務&#xff0c;特別是在水下機器人線纜定制領域&#xff0c;通過…