Best practices for GKE cluster configuration
Configuring Google Kubernetes Engine (GKE) clusters effectively is essential for optimizing performance, reliability, and security in Kubernetes-based environments. Best practices for GKE cluster configuration encompass a set of guidelines, recommendations, and techniques aimed at ensuring the stability, scalability, and efficiency of Kubernetes clusters within Google Cloud Platform (GCP).
At the core of GKE cluster configuration best practices is defining cluster attributes such as node pools, networking, security policies, and add-on features to align with workload requirements and operational objectives. This involves carefully selecting node types, machine configurations, and autoscaling settings to optimize resource utilization and cost efficiency.
Prerequisites
Running GPUs
To see GPUs available in your zone
$ gcloud compute accelerator-types list
In Cluster, Click Add Node Pool.
Give the name for pool.
Choose the node version.
Choose the size of pool and Click Enable Autoscaling.
In Automation, Enable auto-upgrade and Enable auto repair.
Choose the OS for nodes.
In Machine Configuration, Click on GPU.
Choose the GPU type for node pool and give number of GPU
Click Enable Virtual Workstation and Tick I understand the limitations.
Choose the machine configuration for nodes as per your requirement. Click Create. The GPU pool will be created.
Using Shell.
$ gcloud container node-pools create gpu-pool –accelerator type=nvidia-tesla-p4,count=1 –zone us-central1-c –cluster gke-cluster-1 –num-nodes 2 –min-nodes 0 –max-nodes 3 –enable-autoscaling–machine-type n1-standard-1
It will create gpu node pools with 2 nodes in cluster.