Create Node Pool¶
In this section you will add a node pool to your GKE cluster. This will host all Arrikto EKF related workloads.
Note
When creating the GKE cluster, a default node pool is created as well. If you want to use the default node pool, you may proceed to the What's Next section.
Overview
What You'll Need¶
- A management environment with Google Cloud SDK.
- An existing GKE cluster.
- Access to the GKE cluster.
Procedure¶
To create a node pool:
Specify the name of the node pool:
root@rok-tools:~# export NODE_POOL_NAME=workers
Specify the Kubernetes version of the node pool:
root@rok-tools:~# export NODE_VERSION=1.19.16-gke.1500
Specify the machine type:
root@rok-tools:~# export MACHINE_TYPE=n1-standard-8
Specify the number of nodes to create:
root@rok-tools:~# export NUM_NODES=3
Specify the number of local NVMe SSDs to add:
root@rok-tools:~# export NUM_SSD=3
Note
Each local NVMe SSD is 375 GB in size. You can attach a maximum of 24 local SSD partitions for 9 TB per instance.
See also
Create the node pool:
root@rok-tools:~# gcloud alpha container node-pools create ${NODE_POOL_NAME?} \ > --account ${CLUSTER_ADMIN_ACCOUNT?} \ > --cluster ${GKE_CLUSTER?} \ > --node-version ${NODE_VERSION?} \ > --machine-type ${MACHINE_TYPE?} \ > --image-type UBUNTU \ > --disk-type pd-ssd \ > --disk-size 200 \ > --local-ssd-volumes count=${NUM_SSD?},type=nvme,format=block \ > --metadata disable-legacy-endpoints=true \ > --workload-metadata=GKE_METADATA \ > --scopes gke-default \ > --num-nodes ${NUM_NODES?} \ > --no-enable-autoupgrade \ > --max-surge-upgrade 1 \ > --max-unavailable-upgrade 0 \ > --no-enable-autoupgrade \ > --no-enable-autorepair
Verify¶
Verify that the node pool exists and its status is RUNNING:
root@rok-tools:~# gcloud container node-pools describe ${NODE_POOL_NAME?} \ > --cluster=${GKE_CLUSTER?} ... name: workers ... status: RUNNING
Verify that the nodes show up in the Kubernetes cluster:
root@rok-tools:~# kubectl get nodes NAME STATUS ROLES AGE VERSION ... gke-arrikto-cluster-workers-1108b534-3rgs Ready <none> 26m v1.19.16-gke.1500 gke-arrikto-cluster-workers-1108b534-jztj Ready <none> 26m v1.19.16-gke.1500 gke-arrikto-cluster-workers-1108b534-wm2j Ready <none> 26m v1.19.16-gke.1500
Verify that all instances of your node pool have the necessary storage attached:
Find the Instance group that corresponds to the workers node pool:
root@rok-tools:~# export INSTANCE_GROUP=$(gcloud container node-pools describe ${NODE_POOL_NAME?} \ > --cluster=${GKE_CLUSTER?} \ > --format="value(instanceGroupUrls)")
Find the Template of the Instance group:
root@rok-tools:~# export TEMPLATE=$(gcloud compute instance-groups managed describe ${INSTANCE_GROUP?} \ > --format="value(instanceTemplate)")
Inspect the Template and ensure that
kube-env
metadata key has the expectedNODE_LOCAL_SSDS_EXT
:root@rok-tools:~# gcloud compute instance-templates describe ${TEMPLATE?} --format json | \ > jq -r '.properties.metadata.items[] | select(.key == "kube-env") | .value' | \ > grep NODE_LOCAL_SSDS NODE_LOCAL_SSDS_EXT: 3,nvme,block
Inspect the Template and ensure that it has NVMe local SSDs attached. The command below will list all disks of type
SCRATCH
and show their interface. It should beNVME
:root@rok-tools:~# gcloud compute instance-templates describe ${TEMPLATE?} --format json | \ > jq -r '.properties.disks[] | select(.type == "SCRATCH") | .index, .deviceName, .interface' | paste - - - 1 local-ssd-0 NVME 2 local-ssd-1 NVME 3 local-ssd-2 NVME
Ensure that all instances inside the instance group run with the desired template:
root@rok-tools:~# gcloud compute instance-groups managed describe ${INSTANCE_GROUP?} \ > --format="value(status.versionTarget.isReached)" True
What's Next¶
Check out the rest of the maintenance operations that you can perform on your cluster.