GKE Recommendations

What are the GKE Recommendations we can provide and also at which state they will be triggered?

Is this what you are looking for?

https://cloud.google.com/kubernetes-engine/docs/how-to/optimize-with-recommenders

2 Likes

@garisingh
can you provide exactly how they will trigger and what are the recommendations.

what do you mean by recommendations you can provide ?
please elaborate your query in a finer way

I can simplify the Google Kubernetes Engine (GKE) recommendations into two main categories: cluster specific and application specific.

The cluster specific recommendation will be -

  1. IAM and RBAC Recommendations: Review the Identity and Access Management (IAM) roles and Kubernetes RBAC policies. Follow the least privileges principle roles.
  2. Network Configuration Recommendations: Don’t provide unnecessary allows in the firewalls. Use the private subnet and cloud NAT.
  3. Cluster Configuration Recommendations: Enable or adjust the Kubernetes API server’s security settings (e.g., enable private cluster, enable audit logging, set a more restrictive RBAC policy).
  4. Node Pool Recommendations: Change the default node pool configuration including upgrading node version or changing machine types.
  5. Auto-Scaling Recommendations: Enable cluster autoscaler (if required).
  6. Security Recommendations: Enable container analysis or enforce policies like image vulnerability scanning, binary authorization.
  7. Backup and Disaster Recovery Recommendations: Setup the cluster backup and DR plan according to the compliance requirements.
  8. Cost Optimization Recommendations: Use preemptible nodes, optimize reserved instance usage and adjust cluster and pod configuration to minimize costs.

The application specific recommendation will be -

  1. Resource Utilization Recommendations: Adjusting resource requests and limits for containers (CPU and Memory).
  2. Auto-Scaling Recommendations: Enabling Horizontal Pod Autoscaler (HPA) for the application.
  3. Pod Disruption Budget (PDB) Recommendations: Set a Pod Disruption Budget (PDB) for critical applications.
  4. Backup and Disaster Recovery Recommendations: Set up backup and disaster recovery strategies for stateful workloads.
  5. Logging and Monitoring Recommendations: Enable enhanced logging and monitoring for better observability (e.g., Stackdriver Logging, Stackdriver Monitoring).
  6. Persistent Storage Recommendations: Use appropriate storage classes or enforce data locality policies.

You can view these recommendations via the Google Cloud Console (under GKE Recommendations) or use the gcloud command-line tool to pull data related to recommendations. The triggering conditions depend on various factors. Some can be automated using metric data while others require manual setup and monitoring.

1 Like