This document describes how GKE generates optimizations to improve the performance of specific workloads, and how the optimized configurations are applied to the cluster and workload.
To recommend optimized configurations, the Google Cloud CLI command
gcloud container workload profiles manifests create
generates Kubernetes manifests. These manifests can provide optimized
application-level and node-level configurations, which can improve the
performance of Redis and MySQL workloads. For the steps to optimize these
specific workloads, see the following:
For MySQL workloads, see Optimize MySQL workload performance on GKE.
For Redis workloads, see Optimize Redis workload performance on GKE.
How workload optimization works
To improve workload performance, the Google Cloud CLI command
gcloud container workload profiles manifests create generates Kubernetes
manifests with recommended application-level and node-level configurations.
The generated manifests come in the form of ConfigMaps for application-level configurations, and ComputeClasses for node-level configuration. Once you apply the manifests, your workloads can reference the manifests to use the optimized configurations.
The ConfigMaps contain configuration that your application understands.
For example, for Redis, the Google Cloud CLI command creates a
redis.conf file.
The ComputeClasses instruct GKE on what type of nodes to
provision for your workloads.
The recommended optimizations are based on specific use cases, as well as your current configurations.
How optimizations are referenced by your workloads
To take advantage of the optimized configurations provided by Workload Optimization, your Pod needs to reference them. Application-level optimizations (ConfigMaps) are mounted to your Pod as a volume. The mounted file can then be referenced by your application at startup time.
Node-level optimizations (ComputeClasses) are referenced in your Pod's
nodeSelector field.
What's next
- To optimize for MySQL workloads, see Optimize MySQL workload performance on GKE.
- To optimize for Redis workloads, see Optimize Redis workload performance on GKE.
- Learn more about GKE ComputeClasses.