部署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=0

2024-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

已解决

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【Oracle篇】rman全库异机恢复:从单机环境到RAC测试环境的转移(第五篇,总共八篇)

&#x1f4ab;《博主介绍》&#xff1a;✨又是一天没白过&#xff0c;我是奈斯&#xff0c;DBA一名✨ &#x1f4ab;《擅长领域》&#xff1a;✌️擅长Oracle、MySQL、SQLserver、阿里云AnalyticDB for MySQL(分布式数据仓库)、Linux&#xff0c;也在扩展大数据方向的知识面✌️…

车载以太网测试要测些什么呢?

车载以太网测试大致可以分成两块&#xff1a;TC8测试和以太网通信测试。 TC8测试全称TC8一致性测试&#xff0c;其规范由OPEN联盟制定&#xff0c;包括车载以太网ECU从物理层到应用层的各层互操作性以及常规基础功能服务。目的在于提高不同ECU之间的兼容性。 TC8测试规范可以…

C++STL---stack queue知识汇总

前言 C将stack和queue划归到了Containers中&#xff0c;但严格的说这并不准确&#xff0c;stack和queue实际上已经不再是容器了&#xff0c;而是属于容器适配器&#xff0c;适配器做的功能是转换&#xff0c;即&#xff1a;它不是直接实现的&#xff0c;而是由其他容器封装转换…

ruoyi若依二次开发怎么添加扫描自己的controller和mapper,配置三个地方即可。

概要 首先&#xff0c;添加在com.ruoyi外的类&#xff0c;项目启动后&#xff0c;调用接口&#xff0c;是会返回404找不到的。 必须要对这以外的接口类进行配置。目录结构如下&#xff1a; 解决步骤 一、添加 com.ruoyi.framework.config 下&#xff1a; // 指定要扫描的M…

深度学习革命-AI发展详解

深度学习革命 《深度学习革命》是一部引人深思的作品&#xff0c;详细讲述了深度学习技术的发展历程及其对各个行业的深远影响。由杰出的计算机科学家、深度学习专家撰写&#xff0c;这本书不仅适合科技领域的专业人士阅读&#xff0c;也为普通读者提供了一个理解人工智能革命…

LeetCode322.零钱兑换

文章目录 题目描述解题思路递归记忆化搜索动态规划另一种实现 题目描述 https://leetcode.cn/problems/coin-change/description/?envTypestudy-plan-v2&envIdtop-interview-150 给你一个整数数组 coins &#xff0c;表示不同面额的硬币&#xff1b;以及一个整数 amount …

考研规划,这么学上岸率比985的学霸还高!

我觉得985考研上岸率低是可以理解的 因为大家本科能考上985&#xff0c;那研究生大概率会报考和本学校差不多或者更高水平的院校&#xff0c;甚至清华北大都有人敢报&#xff0c;去实现自己本科没有实现的梦想。 而且985其实保研的比例很高&#xff0c;一般有30%的保研比例了…

亚马逊测评自养号技术全攻略:一站式解决方案

在跨境电商这行&#xff0c;产品测评可是个大问题。如果你的商品销量少&#xff0c;评价也不多&#xff0c;那买家就很难注意到你的产品&#xff0c;更别提下单购买了。毕竟&#xff0c;大家都喜欢跟风买那些已经有很多人好评的产品&#xff0c;而不是冒险尝试一个全新的。 我们…

基于JSP技术的社区疫情防控管理信息系统

你好呀&#xff0c;我是计算机学长猫哥&#xff01;如果有相关需求&#xff0c;文末可以找到我的联系方式。 开发语言&#xff1a;JSP 数据库&#xff1a;MySQL 技术&#xff1a;JSPJavaBeans 工具&#xff1a;MyEclipse、Tomcat、Navicat 系统展示 首页 用户注册与登录界…

《大宅门》特别活动走进李良济,开启探寻中医药文化之旅!

《大宅门》话剧将于6月14-16日在苏州湾大剧院上演&#xff0c;为了让大家了解到中医药知识&#xff0c;6月2日&#xff0c;李良济携手苏州湾大剧院举办《大宅门》特别活动“探寻中医药文化之旅”&#xff01; 6月2日下午&#xff0c;大家一起走进李良济&#xff0c;深度了解传统…

Django框架中级

Django框架中级 – 潘登同学的WEB框架 文章目录 Django框架中级 -- 潘登同学的WEB框架 中间件自定义中间件常用中间件process_view() 使用中间件进行URL过滤 Django生命周期生命周期分析 Django日志日志配置filter过滤器自定义filter 日志格式化formatter Django信号内置信号定…

51单片机STC89C52RC——1.1点亮一个LED

目录 STC单片机模块 LED模块 创建Keil项目 代码 效果 STC单片机模块 我们程序中要点亮的LED灯的位置如下图。 我们程序要用到的针脚如下图 LED模块 电路图如下 8个LED&#xff0c;全部点亮 每一bit位 都需要设置为0 二进制是0000 0000 。如果只点亮D1一个&#xff…

进口电动低温调节阀的作用-美国NOTON

进口电动低温调节阀在低温环境下的精确控制、广泛的工业应用、高效能设计、耐低温性和密封性、稳定性及可靠性以及安全性等方面发挥着重要作用。 进口电动低温调节阀的作用主要体现在以下几个方面&#xff1a; 低温环境下的精确控制&#xff1a; 进口电动低温调节阀是一种专为…

jenkins插件之Jdepend

JDepend插件是一个为构建生成JDepend报告的插件。 安装插件 JDepend Dashboard -->> 系统管理 -->> 插件管理 -->> Available plugins 搜索 Jdepend, 点击安装构建步骤新增执行shell #执行pdepend if docker exec phpfpm82 /tmp/composer/vendor/bin/pdepe…

怎么把wmv格式转换成mp4?四种将wmv转成MP4格式的方法

怎么把wmv格式转换成mp4&#xff1f;在微软操作系统中&#xff0c;我们经常会遇到wmv格式的视频文件。这种由微软开发的视频格式在微软平台上有很好的兼容性&#xff0c;但它也存在一些被忽视的缺点。首先&#xff0c;wmv格式支持数字版权管理&#xff0c;这意味着某些视频可能…

期权有用吗?期权都有哪些用途?

今天带你了解期权有用吗&#xff1f;期权都有哪些用途&#xff1f;期权和期货作为衍生工具,都有风险管理、资产配置和价格发现等功能。 期权有用吗&#xff1f; 期权作为一种衍生金融工具&#xff0c;具有多种用途和好处&#xff0c;对不同类型的投资者和市场参与者来说&#…

Ubuntu编译指定版本NVMe Cli工具

1.克隆nvme-cli的存储库&#xff08;repository&#xff09;&#xff1a; git clone https://github.com/linux-nvme/nvme-cli.git2. 进入nvme-cli目录&#xff0c;并切换到指定版本&#xff1a; cd nvme-cli git checkout v1.93. 编译nvme-cli&#xff1a; make4. 安装nvme…

剪画小程序:图片去除文字,我用它只要10秒!

Hello&#xff0c;大家好呀&#xff01;我是不会画画的小画~ 图片上的文字该如何去除&#xff1f; 在工作或者学习中&#xff0c;我们常常需要处理一些图片文件&#xff0c;比如扫描的文件、 电子文档等。有时候&#xff0c;图片上可能会有文字&#xff0c;这时候需要将图片…

鸿蒙开发:从入门到实战!

一&#xff0c;默认模版中是容器Row或者Column中添加一个Text文本&#xff0c;我们可以尝试一下修改它的内容和样式&#xff0c;对UI语法有一个初体验&#xff1a; // 文本内容 Text("沉默的闪客") // 字体大小 .fontSize(50) //背…

VS-qt中运行程序时报错:fatal error RC1015:cannot open include file ‘afxres.h‘

开发环境&#xff1a;VS2015 qt5.12.10 点击运行时报错如下&#xff1a; 搜索了下afxres.h文件&#xff0c;发现位置如下&#xff1a; 看样子是VS中少安装了部分模块导致的&#xff0c;&#xff0c;看了同事的电脑&#xff0c;该文件应该是在以下目录中的&#xff1a; 所…