Rate This Document
Findability
Accuracy
Completeness
Readability

Verifying K8s + Docker Deployment

Run the following two cases. If the output is consistent with the expected result, the deployment is successful.

Case No.

001

Test

Checking nodes in the K8s cluster

Test Networking

Deploy the network by referring to chapter Environment Requirements.

Prerequisites

  1. Install Docker by referring to chapter Installing Docker.
  2. Install K8s, configure the master node, and add the compute nodes to the cluster by referring to chapter Installing K8s.

Test Procedure

Check the cluster nodes on the master node. The expected result is displayed.

kubectl get nodes

Expected Result

All compute nodes are added to the cluster. For details, see the screenshot in the "Remarks" row.

Remarks

Case No.

002

Test

The master node provisions containers to the Kunpeng nodes.

Test Networking

Deploy the network by referring to chapter Environment Requirements.

Prerequisites

The Kunpeng servers have been added to the cluster and are in the Ready state.

Test Procedure

  1. Write the YAML file on the master node.
    vi nginx-arm.yaml
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: nginx-arm-deployment
    spec:
      selector:
        matchLabels:
          app: arm64v8_nginx
      replicas: 40
      template:
        metadata:
          labels:
            app: arm64v8_nginx
          annotations:
            cni: "flannel"
        spec:
          containers:
          - name: nginx
            image: nginx:latest
            ports:
            - containerPort: 80
          nodeSelector:
            kubernetes.io/arch: arm64
  2. On the master node, create pods based on the YAML file.
    kubectl apply -f nginx-arm.yaml
  3. Check the pod status on the master node. Expected result 1 is displayed.
    kubectl get pods -o wide -A
  4. Log in to the Kunpeng nodes where the pods are located and check the architecture of the Docker image. Expected result 2 is displayed.
    docker inspect nginx

Expected Result

  1. The nodes where the pods of Nginx reside are the Kunpeng nodes. For details, see the screenshot in the "Remarks" row.
  2. The system architecture is Arm64. For details, see the screenshot in the "Remarks" row.

Remarks

  1. The nodes where the pods of Nginx reside are the Kunpeng nodes.

  2. The system architecture is Arm64.