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
@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 -
- IAM and RBAC Recommendations: Review the Identity and Access Management (IAM) roles and Kubernetes RBAC policies. Follow the least privileges principle roles.
- Network Configuration Recommendations: Don’t provide unnecessary allows in the firewalls. Use the private subnet and cloud NAT.
- 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).
- Node Pool Recommendations: Change the default node pool configuration including upgrading node version or changing machine types.
- Auto-Scaling Recommendations: Enable cluster autoscaler (if required).
- Security Recommendations: Enable container analysis or enforce policies like image vulnerability scanning, binary authorization.
- Backup and Disaster Recovery Recommendations: Setup the cluster backup and DR plan according to the compliance requirements.
- 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 -
- Resource Utilization Recommendations: Adjusting resource requests and limits for containers (CPU and Memory).
- Auto-Scaling Recommendations: Enabling Horizontal Pod Autoscaler (HPA) for the application.
- Pod Disruption Budget (PDB) Recommendations: Set a Pod Disruption Budget (PDB) for critical applications.
- Backup and Disaster Recovery Recommendations: Set up backup and disaster recovery strategies for stateful workloads.
- Logging and Monitoring Recommendations: Enable enhanced logging and monitoring for better observability (e.g., Stackdriver Logging, Stackdriver Monitoring).
- 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.