部署kubesphere报错

news2024/11/17 10:36:32

安装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

已解决

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

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

相关文章

【数据结构初阶】--- 顺序表

顺序表&#xff0c;好像学C语言时从来没听过&#xff0c;实际上就是给数组穿了层衣服&#xff0c;本质是一模一样的。 这里的顺序表实际是定义了一个结构体&#xff0c;设计各种函数来实现它的功能&#xff0c;比如说数组中的增删改查插入&#xff0c;这些基本操作其实平时就会…

【YOLOV8】4.图片分类-训练自己的数据集

Yolo8出来一段时间了,包含了目标检测、实例分割、人体姿态预测、旋转目标检测、图像分类等功能,所以想花点时间总结记录一下这几个功能的使用方法和自定义数据集需要注意的一些问题,本篇是第四篇,图像分类功能,自定义数据集的训练。 YOLO(You Only Look Once)是一种流行的…

拥抱生态农业,享受绿色生活

随着人们对健康生活的追求日益增强&#xff0c;生态农业逐渐成为人们关注的焦点。我们深知生态农业对于保护生态环境、提高农产品品质的重要性&#xff0c;因此&#xff0c;我们积极推广生态农业理念&#xff0c;让更多的人了解并参与到生态农业的实践中来。 生态农业的蓝总说&…

ALSA 用例配置

ALSA 用例配置。参考 ALSA 用例配置 来了解更详细信息。 ALSA 用例配置 用例配置文件使用 配置文件 语法来定义静态配置树。该树在运行时根据配置树中的条件和动态变量进行评估&#xff08;修改&#xff09;。使用 用例接口 API 解析结果并将其导出到应用程序。 配置目录和主…

苹果手机618大降价重登销量榜首 红米K70pro为何成京东618国产手机之光

今天的618已经好几天了&#xff0c;很多买有机的已经下单&#xff0c;不出意外苹果15系列手机仍然是最卖座的手机&#xff0c;大家虽然口号喊得很响身体却是诚实的。但令人感到意外的是&#xff0c;今年618国产手机的第一把交椅确实红米K70系列&#xff0c;说好的支持华为呢&am…

给孩子的端午节礼物:最新初中数学思维导图大合集+衡水高考学霸笔记,可下载打印!

大家好哇&#xff01;端午节到了&#xff0c;阿星给家里有孩子的伙伴们一份礼物哦&#xff01;今天给大家带来一个超级实用的学习神器——思维导图法&#xff0c;最新版的初中数学思维导图大合集&#xff01; 这可不是我吹哦&#xff0c;连哈佛、剑桥大学都在用的高级学习方法…

常见硬件工程师面试题(一)

大家好&#xff0c;我是山羊君Goat。 对于硬件工程师&#xff0c;学习的东西主要和电路硬件相关&#xff0c;所以在硬件工程师的面试中&#xff0c;对于经验是十分看重的&#xff0c;像PCB设计&#xff0c;电路设计原理&#xff0c;模拟电路&#xff0c;数字电路等等相关的知识…

webman中创建udp服务

webman是workerman的web开发框架 可以很容易的开启udp服务 tcp建议使用gatewayworker webman GatewayWorker插件 创建udp服务: config/process.php中加入: return [// File update detection and automatic reloadmonitor > [ ...........], udp > [handler > p…

转速传感器介绍

一、概述 RPM&#xff08;Revolutions Per Minute&#xff09;转速传感器是一种用于测量旋转机械设备转速的传感器。它可以检测旋转部件上的特定位置标记&#xff08;如齿轮、凸起或磁铁&#xff09;&#xff0c;并根据这些标记的通过频率来计算转速。发电额定频率是50hz和60z…

链表题目练习----重排链表

这道题会联系到前面写的一篇文章----快慢指针相关经典问题。 重排链表 指针法 这道题乍一看&#xff0c;好像有点难处理&#xff0c;但如果仔细观察就会发现&#xff0c;这道题是查找中间节点反转链表链表的合并问题&#xff0c;具体细节有些不同&#xff0c;这个在反装中间链…

Apache Doris 基础 -- 数据表设计(表索引)

1、索引概述 索引用于帮助快速过滤或搜索数据。目前&#xff0c;Doris支持两种类型的索引:内置智能索引和用户创建的二级索引。 内置智能索引 排序键和前缀索引:Apache Doris基于排序键以有序的方式存储数据。它为每1024行数据创建一个前缀索引。索引中的键是当前1024行组的…

国产主流软硬件厂商生态分析

国产领域主流厂商汇总 信创&#xff0c;即信息技术应用创新&#xff0c;由“信息技术应用创新工作委员会”于2016年3月4日发起&#xff0c;是专注于软硬件关键技术研发、应用与服务的非营利性组织。作为科技自强的关键力量&#xff0c;信创在我国信息化建设中占据核心地位&…

小白必学!场外期权的交易模式

场外期权的交易模式 随着金融市场的深化与创新&#xff0c;场外期权交易作为一种灵活多样的金融衍生品交易方式&#xff0c;正逐渐成为投资者关注的焦点。场外期权&#xff0c;顾名思义&#xff0c;是在非交易所市场进行的期权交易&#xff0c;与交易所期权有着显著的区别。那…

IDEA 中设置 jdk 的版本

本文介绍一下 IDEA 中设置 jdk 版本的步骤。 一共有三处需要配置。 第一处 File --> Project Structure Project 和 Modules 下都需要指定一下。 第二处 File --> Settings 第三处 运行时的配置

【C语言进阶】--- 指针详解 3.0

接下来进入指针的进阶部分&#xff0c;准备好大脑 补充&#xff1a;&#xff08;重点&#xff09; 数组名是数组首元素地址 数组首元素地址和数组地址&#xff0c;值相同&#xff0c;但本质不同&#xff0c; 区别在于二者的类型不相同 比如数组int arr[10]; 数组首元素地址的类…

罗马仕、西圣、绿联充电宝哪个牌子好?热销充电宝实测对比!

在这个快节奏的时代&#xff0c;智能手机已成为我们日常生活中不可或缺的一部分&#xff0c;但电量焦虑也随之而来。无论是忙碌的工作日&#xff0c;还是休闲的周末出行&#xff0c;一款可靠、高效的充电宝成为了许多人的随身必备。在市场上众多充电宝品牌中&#xff0c;罗马仕…

题解web

1.[LitCTF 2023]Follow me and hack me 1&#xff09;进入题目环境&#xff0c;提示get传参&#xff0c;post传参 2&#xff09;看看源码&#xff0c;也没啥 3&#xff09;直接用hackbar&#xff0c;传入对应参数即可得到FLAG 3&#xff09;但是扫描出来它后端还有东西&#x…

java线程变量共享

在Java中&#xff0c;线程变量共享可以通过几种方式实现&#xff1a; 1.实例变量&#xff1a;如果一个实例变量被多个线程共享&#xff0c;你需要确保适当的同步&#xff0c;以避免竞态条件。你可以使用synchronized关键字或者Lock接口来保护共享变量。 2.静态变量&#xff1a;…

InternLM-XComposer2-4KHD开拓性的4K高清视觉-语言模型

大型视觉-语言模型&#xff08;LVLM&#xff09;在图像字幕和视觉问答&#xff08;VQA&#xff09;等任务中表现出色。然而&#xff0c;受限于分辨率&#xff0c;这些模型在处理包含细微视觉内容的图像时面临挑战。 分辨率的限制严重阻碍了模型处理含有丰富细节的图像的能力。…

高级文件操作

自学python如何成为大佬(目录):https://blog.csdn.net/weixin_67859959/article/details/139049996?spm1001.2014.3001.5501 Python内置的os模块除了可以对目录进行操作&#xff0c;还可以对文件进行一些高级操作&#xff0c;具体函数如表4所示。 表4 os模块提供的与文件相…