Node Pool Management

    2)Example of Nodepool usage

    • Create a nodepool
    • Get the nodepool information
    1. $ kubectl get np
    2. NAME TYPE READYNODES NOTREADYNODES AGE
    3. beijing Cloud 35s
    4. hangzhou Edge 28s
    • Add node to nodepool
    1. For example:
    2. $ kubectl label node master apps.openyurt.io/desired-nodepool=beijing
    3. master labeled
    • Verify whether a node is added to a nodepool:
    1. $ kubectl get node {Your_Node_Name} -o yaml
    2. For Example:
    3. $ kubectl get node k8s-node1 -o yaml
    4. apiVersion: v1
    5. metadata:
    6. annotations:
    7. apps.openyurt.io/example: test-hangzhou
    8. kubeadm.alpha.kubernetes.io/cri-socket: /var/run/dockershim.sock
    9. node.alpha.kubernetes.io/ttl: "0"
    10. node.beta.alibabacloud.com/autonomy: "true"
    11. volumes.kubernetes.io/controller-managed-attach-detach: "true"
    12. creationTimestamp: "2021-04-14T12:17:39Z"
    13. labels:
    14. apps.openyurt.io/desired-nodepool: hangzhou
    15. apps.openyurt.io/example: test-hangzhou
    16. apps.openyurt.io/nodepool: hangzhou
    17. beta.kubernetes.io/os: linux
    18. kubernetes.io/arch: amd64
    19. kubernetes.io/os: linux
    20. openyurt.io/is-edge-worker: "true"
    21. name: k8s-node1
    22. resourceVersion: "1244431"
    23. selfLink: /api/v1/nodes/k8s-node1
    24. uid: 1323f90b-acf3-4443-a7dc-7a54c212506c
    25. spec:
    26. podCIDR: 192.168.1.0/24
    27. podCIDRs:
    28. - 192.168.1.0/24
    29. taints:
    30. - effect: NoSchedule
    31. key: apps.openyurt.io/example
    32. value: test-hangzhou