### List Files in Driver Installation Directory Source: https://support.huaweicloud.com/cce_faq/cce_faq_00501.html Lists all files within the NVIDIA driver installation directory to verify the presence of essential driver files like nvidia.run and installation logs. ```bash ls -l ``` -------------------------------- ### Ingress Resource Example with Annotations and IngressClassName Source: https://support.huaweicloud.com/cce_faq/cce_faq_00430.html This YAML example demonstrates how to specify the Ingress class using both annotations and the spec.ingressClassName field. ```yaml apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: test namespace: default annotations: kubernetes.io/ingress.class: nginx spec: ingressClassName: nginx rules: … status: loadBalancer: {} ``` -------------------------------- ### Install Missing GPU Driver Dependencies Source: https://support.huaweicloud.com/cce_faq/cce_faq_00491.html Execute this command to install the necessary development tools and libraries required for NVIDIA driver installation on EulerOS. ```bash yum install -y gcc gcc-c++ perl make elfutils-libelf-devel libX11 libXext binutils ``` -------------------------------- ### Example resolv.conf Configuration Source: https://support.huaweicloud.com/cce_faq/cce_faq_00195.html This is an example of the resolv.conf file found within a CCE workload's container. It shows the 'nameserver', 'search', 'ndots', 'timeout', and 'single-request-reopen' parameters. ```text nameserver: 10.0.0.2 search: ns1.svc.cluster.local svc.cluster.local cluster.local ndots: 5 timeout: 1 single-request-reopen ``` -------------------------------- ### Successful Dependency Installation Confirmation Source: https://support.huaweicloud.com/cce_faq/cce_faq_00491.html A 'Complete!' message indicates that all specified dependencies have been successfully installed. ```text ... Complete! ``` -------------------------------- ### CCE Plugin Installation Timeout Error Source: https://support.huaweicloud.com/cce_faq/cce_faq_00474.html If a plugin installation or upgrade times out, it's often because the plugin's Pod is not reaching a ready state. This example shows a typical timeout message. ```text Release "*****" failed: failed pre-install: timed out waiting for the condition ``` -------------------------------- ### Install NPU Driver for All Users Source: https://support.huaweicloud.com/cce_faq/cce_faq_00494.html This command installs the NPU driver for all users. It may fail if the default system user 'HwHiAiUser' does not exist. ```bash ./A300-3010-npu-driver_24.1.rc3.1_linux-aarch64.run --install-for-all --full ``` -------------------------------- ### Querying NVIDIA Driver Installation Log Source: https://support.huaweicloud.com/cce_faq/cce_faq_00491.html Use this command to view the NVIDIA installer log file, which can help identify the root cause of installation errors. ```bash cat /var/log/nvidia-installer.log ``` -------------------------------- ### Example: Updating a Listener Source: https://support.huaweicloud.com/cce_faq/cce_faq_00493.html This example demonstrates a situation where an existing listener requires an update. It highlights a discrepancy in SNI configuration, indicating that the ELB listener's SNI feature might be enabled while not configured in the Ingress. ```text inconsistent: ingress(default/cce-elb-ingress) need update listener(5ca8a931-9d7a-465e-b503-08f88d528cd8), the wanted configuration is {"id":"5ca8a931-9d7a-465e-b503-08f88d528cd8","sni_container_refs":null} ``` -------------------------------- ### Example Inconsistent ELB Ingress Configurations Source: https://support.huaweicloud.com/cce_faq/cce_faq_00493.html These examples show various inconsistencies detected between Ingress configurations and ELB settings, indicating required actions like creating listeners, pools, members, or policies. ```text inconsistent: ingress(default/nginx) need create listener(HTTP/8000) of elb(4a090bf3-9d11-45dc-8d04-f9cf010ba2ec), the wanted configuration is {"name":"k8s_HTTP_8000","protocol_port":8000,"protocol":"HTTP","loadbalancer_id":"4a090bf3-9d11-45dc-8d04-f9cf010ba2ec","sni_container_refs":null,"http2_enable":false} inconsistent: ingress(default/nginx) need create pool(k8s_default_nginx-80_HTTP-8000), the wanted configuration is {"name":"k8s_default_nginx-80_HTTP-8000","protocol":"HTTP","loadbalancer_id":"4a090bf3-9d11-45dc-8d04-f9cf010ba2ec","lb_algorithm":"ROUND_ROBIN","slow_start":{"enable":false,"duration":30}} inconsistent: need create member(address: 172.16.0.54) of pool(k8s_default_nginx-80_HTTP-8000), the wanted configuration is {"name":"2c2405d1abc17da48c70e9edc9a340fc","subnet_cidr_id":"77b9ad29-e30f-451b-92e7-949b83220b0f","address":"172.16.0.54","protocol_port":30838,"weight":6} inconsistent: ingress(default/nginx) need create l7policy(k8s_default_nginx_6666cd76) of listener(k8s_HTTP_8000/HTTP/8000), the wanted configuration is {"name":"k8s_default_nginx_6666cd76","listener_id":"k8s_HTTP_8000/HTTP/8000","action":"REDIRECT_TO_POOL","redirect_pool_id":"k8s_default_nginx-80_HTTP-8000"} inconsistent: ingress(default/nginx) need create rule of l7policy(k8s_default_nginx_6666cd76), the wanted configuration is {"type":"PATH","compare_type":"STARTS_WITH","value":"/"} ``` -------------------------------- ### Pod Toleration Configuration Example 1 Source: https://support.huaweicloud.com/cce_faq/cce_faq_00415.html This is an example of a Pod toleration configuration that specifies a key, operator, value, and effect. Ensure these match the node's taints for proper scheduling. ```yaml tolerations: - key: "key1" operator: "Equal" value: "value1" effect: "NoSchedule" ``` -------------------------------- ### Example: Creating a Listener Source: https://support.huaweicloud.com/cce_faq/cce_faq_00493.html This example illustrates a scenario where a listener needs to be created for an ELB Ingress. It specifies the ELB ID, protocol, port, and desired listener name, along with configuration details like SNI and HTTP2. ```text inconsistent: ingress(default/nginx) need create listener(HTTP/8000) of elb(4a090bf3-9d11-45dc-8d04-f9cf010ba2ec), the wanted configuration is {"name":"k8s_HTTP_8000","protocol_port":8000,"protocol":"HTTP","loadbalancer_id":"4a090bf3-9d11-45dc-8d04-f9cf010ba2ec","sni_container_refs":null,"http2_enable":false} ``` -------------------------------- ### CronJob YAML Configuration with startingDeadlineSeconds Source: https://support.huaweicloud.com/cce_faq/cce_faq_00213.html This YAML example demonstrates how to configure the startingDeadlineSeconds parameter in a CronJob. This parameter specifies the deadline in seconds for starting the job of a missed schedule. Jobs that miss their scheduled time by more than this deadline will not be started. ```yaml apiVersion: batch/v1 kind: CronJob metadata: name: hello spec: startingDeadlineSeconds: 200 schedule: "* * * * *" jobTemplate: spec: template: spec: containers: - name: hello image: busybox:1.28 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - date; echo Hello restartPolicy: OnFailure ``` -------------------------------- ### Kubernetes Event: Disk Space Full Source: https://support.huaweicloud.com/cce_faq/cce_faq_00015.html An example Kubernetes event indicating that a pod sandbox creation failed due to insufficient disk space on the node. This prevents new images from being pulled or containers from starting. ```text Failed create pod sandbox: rpc error: code = Unknown desc = failed to create a sandbox for pod "nginx-6dc48bf8b6-l8xrw": Error response from daemon: mkdir xxxxx: no space left on device ``` -------------------------------- ### Ingress Configuration with Property Annotation Source: https://support.huaweicloud.com/cce_faq/cce_faq_00234.html This example shows an Ingress configuration with the 'kubernetes.io/ingress.property' annotation, demonstrating how to specify host, path, and match mode for routing. ```yaml kind: Ingress apiVersion: extensions/v1beta1 metadata: name: test namespace: default resourceVersion: '2904229' generation: 1 labels: isExternal: 'true' zone: data annotations: kubernetes.io/ingress.class: cce kubernetes.io/ingress.property: '[{"host":"test.com","path":"/test","matchmode":"STARTS_WITH"},{"Path":"/dw","MatchMode":"EQUAL_TO"}]' spec: rules: - host: test.com http: paths: - path: /ss backend: serviceName: zlh-test servicePort: 80 - path: /dw backend: serviceName: zlh-test servicePort: 80 ``` -------------------------------- ### CCE Plugin Resource Conflict Error Source: https://support.huaweicloud.com/cce_faq/cce_faq_00474.html When installing a plugin, an 'Internal Error' with code CCE.03500001 may indicate a conflict with existing cluster resources. This snippet shows an example error message indicating a pre-existing ClusterRole. ```text ClusterRole "gatekeeper-manager-role" in namespace "" exists and cannot be imported into the current release ``` -------------------------------- ### Pod Creation with ExtendPathMode Annotation Source: https://support.huaweicloud.com/cce_faq/cce_faq_00235.html This YAML example demonstrates how to create a Pod with the 'kubernetes.io/extend-path-mode' annotation. This is necessary for compatibility with community client-go when using CCE's Pod interface. ```yaml apiVersion: v1 kind: Pod metadata: name: test-8b59d5884-96vdz generateName: test-8b59d5884- namespace: default selfLink: /api/v1/namespaces/default/pods/test-8b59d5884-96vdz labels: app: test pod-template-hash: 8b59d5884 annotations: kubernetes.io/extend-path-mode: '[{"containername":"container-0","name":"vol-156738843032165499","mountpath":"/tmp","extendpathmode":"PodUID"}]' metrics.alpha.kubernetes.io/custom-endpoints: '[{"api":"","path":"","port":"","names":""}]' ownerReferences: - apiVersion: apps/v1 kind: ReplicaSet name: test-8b59d5884 uid: 2633020b-cd23-11e9-8f83-fa163e592534 controller: true blockOwnerDeletion: true spec: volumes: - name: vol-156738843032165499 hostPath: path: /tmp type: '' - name: default-token-4s959 secret: secretName: default-token-4s959 defaultMode: 420 containers: - name: container-0 image: 'nginx:latest' env: - name: PAAS_APP_NAME value: test - name: PAAS_NAMESPACE value: default - name: PAAS_PROJECT_ID value: b6315dd3d0ff4be5b31a963256794989 resources: limits: cpu: 250m memory: 512Mi requests: cpu: 250m memory: 512Mi volumeMounts: - name: vol-156738843032165499 mountPath: /tmp extendPathMode: PodUID - name: default-token-4s959 readOnly: true mountPath: /var/run/secrets/kubernetes.io/serviceaccount terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: Always restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst serviceAccountName: default serviceAccount: default nodeName: 192.168.0.24 securityContext: {} imagePullSecrets: - name: default-secret - name: default-secret affinity: {} schedulerName: default-scheduler tolerations: - key: node.kubernetes.io/not-ready operator: Exists effect: NoExecute tolerationSeconds: 300 - key: node.kubernetes.io/unreachable operator: Exists effect: NoExecute tolerationSeconds: 300 priority: 0 dnsConfig: options: - name: timeout value: '' - name: ndots value: '5' - name: single-request-reopen enableServiceLinks: true ``` -------------------------------- ### Unaffected Node Identification Example Source: https://support.huaweicloud.com/cce_faq/cce_faq_00304.html This is an example of the output indicating a node is not affected by the issue. ```bash node 10.2.0.35 works well ``` -------------------------------- ### Successful vcjob Status Example Source: https://support.huaweicloud.com/cce_faq/cce_faq_00492.html This is the expected output when a vcjob resource is successfully created and running. ```text NAME STATUS MINAVAILABLE RUNNINGS AGE vcjob_name Running 1 2m30s ``` -------------------------------- ### View NVIDIA Driver Installer Log Source: https://support.huaweicloud.com/cce_faq/cce_faq_00501.html Displays the installation log for the NVIDIA driver. This helps in identifying any errors or issues during the driver installation process. The log file path may vary for plugin versions older than 2.0.0. ```bash cat /usr/local/nvidia/nvidia-installer.log ``` -------------------------------- ### View Disk and Partition Sizes Source: https://support.huaweicloud.com/cce_faq/cce_faq_00018.html Use the `lsblk` command to inspect the current disk and partition layout, including LVM volumes and mount points. ```bash # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 50G 0 disk └─sda1 8:1 0 50G 0 part / sdb 8:16 0 150G 0 disk ├─vgpaas-dockersys 253:0 0 140G 0 lvm /var/lib/containerd └─vgpaas-kubernetes 253:1 0 10G 0 lvm /mnt/paas/kubernetes/kubelet ``` ```bash # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 8:0 0 50G 0 disk └─vda1 8:1 0 50G 0 part / vdb 8:16 0 200G 0 disk ├─vgpaas-dockersys 253:0 0 18G 0 lvm /var/lib/docker ├─vgpaas-thinpool_tmeta 253:1 0 3G 0 lvm │ └─vgpaas-thinpool 253:3 0 67G 0 lvm # thinpool空间 │ ... ├─vgpaas-thinpool_tdata 253:2 0 67G 0 lvm │ └─vgpaas-thinpool 253:3 0 67G 0 lvm │ ... └─vgpaas-kubernetes 253:4 0 10G 0 lvm /mnt/paas/kubernetes/kubelet ``` ```bash # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 8:0 0 50G 0 disk └─vda1 8:1 0 50G 0 part / vdb 8:16 0 200G 0 disk ├─vgpaas-dockersys 253:0 0 118G 0 lvm /var/lib/docker # 扩容后的dockersys盘 ├─vgpaas-thinpool_tmeta 253:1 0 3G 0 lvm │ └─vgpaas-thinpool 253:3 0 67G 0 lvm │ ... ├─vgpaas-thinpool_tdata 253:2 0 67G 0 lvm │ └─vgpaas-thinpool 253:3 0 67G 0 lvm │ ... └─vgpaas-kubernetes 253:4 0 10G 0 lvm /mnt/paas/kubernetes/kubelet ``` -------------------------------- ### 检查Pod子网网关连通性 Source: https://support.huaweicloud.com/cce_faq/cce_faq_00121.html 当Pod网络异常时,可在容器内尝试ping子网网关以诊断连通性问题。此命令用于检查Pod与网关之间的网络是否通畅。 ```bash arping -I eth0 $Pod的子网网关 ``` -------------------------------- ### Get Pod ID and Container ID on Containerd Node Pool Source: https://support.huaweicloud.com/cce_faq/cce_faq_00414.html On a Containerd node pool, first get the Pod ID using 'crictl pods', then get the full container ID using 'crictl ps'. Replace {pod name} and {container name} accordingly. ```bash # 获取Pod ID crictl pods | grep {pod name} | awk '{print $1}' # 获取完整容器ID crictl ps --no-trunc | grep {pod id} | grep {container name} | awk '{print $1}' ``` -------------------------------- ### Successful Driver Installation Message Source: https://support.huaweicloud.com/cce_faq/cce_faq_00491.html Absence of 'ERROR' messages in the output signifies a successful driver installation. Note the warning about Vulkan components. ```text Verifying archive integrity... OK ... WARNING: This NVIDIA driver package includes Vulkan components, but no Vulkan ICD loader was detected on this system. The NVIDIA Vulkan ICD will not function without the loader. Most distributions package the Vulkan loader; try installing the "vulkan-loader", "vulkan-icd-loaderor,""libvulkanl" package. ``` -------------------------------- ### Silent NVIDIA Driver Installation Source: https://support.huaweicloud.com/cce_faq/cce_faq_00491.html This command installs the NVIDIA driver silently, accepting the license agreement. Ensure all dependencies are met before running. ```bash ./NVIDIA-Linux-x86_64-535.54.03.run --silent --accept-license ``` -------------------------------- ### Example Chart.yaml for nginx-ingress Template Source: https://support.huaweicloud.com/cce_faq/cce_faq_00425.html This snippet shows an example Chart.yaml file for the nginx-ingress template, defining its name as 'newer-nginx-ingress' and version as '4.4.2'. Ensure your package name follows the format {name}-{version}.tgz. ```yaml annotations: artifacthub.io/changes: | - Adding support for disabling liveness and readiness probes to the Helm chart - add:(admission-webhooks) ability to set securityContext - Updated Helm chart to use the fullname for the electionID if not specified - Rename controller-wehbooks-networkpolicy.yaml artifacthub.io/prerelease: "false" apiVersion: v2 appVersion: 1.5.1 description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer home: https://github.com/kubernetes/ingress-nginx icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png keywords: - ingress - nginx kubeVersion: '>=1.20.0-0' maintainers: - name: rikatz - name: strongjz - name: tao12345666333 name: newer-nginx-ingress sources: - https://github.com/kubernetes/ingress-nginx version: 4.4.2 ``` -------------------------------- ### Check Container Storage Expansion (Overlayfs) Source: https://support.huaweicloud.com/cce_faq/cce_faq_00224.html Execute this command to verify if the container storage has been successfully expanded when using the Overlayfs file system. This command checks the mounted file systems and their capacities. ```bash kubectl exec -it pod_name -- /bin/sh df -h ``` -------------------------------- ### HSTS Response Header Example Source: https://support.huaweicloud.com/cce_faq/cce_faq_00489.html This is an example of the HSTS response header that a server sends to a client, instructing the browser to only use HTTPS for a specified duration. ```text Strict-Transport-Security: max-age=31536000; includeSubDomains ``` -------------------------------- ### Create and Access Pod for Service Testing Source: https://support.huaweicloud.com/cce_faq/cce_faq_00313.html Create a temporary Pod to test access to a Service using its ClusterIP and port. This verifies if the Service can reach the backend workload. ```bash kubectl run -i --tty --image nginx:alpine test --rm /bin/sh ``` ```bash curl 10.247.138.227:80 ``` -------------------------------- ### ELB Ingress Alarm Example Source: https://support.huaweicloud.com/cce_faq/cce_faq_00483.html This snippet shows an example of the alarm message received when creating or updating an ELB Ingress with invalid rule inputs. ```text Update elb(*****) listener(*****)error: status_code: 400, resp_body:{"error_msg":"Invalid input for rules. Reason: the number of condition for per policy must be no larger than 10.","error_code":"ELB.8902"."request_id": *****} ``` -------------------------------- ### Extract cce-pause Image Installation Package Source: https://support.huaweicloud.com/cce_faq/cce_faq_00140.html Use this command to manually extract the cce-pause image installation package on the affected node. This is a prerequisite for re-importing the image. ```bash tar -xzvf /opt/cloud/cce/package/node-package/pause-*.tgz ```