This page shows you how to view insights and recommendations about Kubernetes deprecations for your Google Kubernetes Engine (GKE) clusters. To learn more about how to handle Kubernetes deprecations with GKE, see GKE deprecations.
What are deprecation insights and recommendations?
When GKE detects that a cluster is using a Kubernetes feature or API that is deprecated and will be removed in an upcoming minor version, the following happens:
- Automatic upgrade to the upcoming minor version is paused. To learn more about how this works, see What happens when GKE pauses automatic upgrades.
- An insight and recommendation are generated so that you can assess and mitigate your cluster's exposure to the deprecation.
Deprecation insights and recommendations are available from Recommender, a service that provides insights and recommendations for using resources on Google Cloud.
For the deprecations topic with Recommender:
- An insight explains that your cluster uses a feature or API that is deprecated and will be removed in an upcoming minor version.
- A recommendation provides guidance on what to do to mitigate your cluster's exposure to the deprecation.
For example, an insight might explain that your cluster is using a beta API that is deprecated and will be removed in the next minor version. The recommendation explains that you should migrate your workloads from using the beta APIs to using v1 APIs.
Remember that for upcoming deprecations, you must independently assess your cluster environment's exposure and mitigate any issues.
Before you begin
Before you start, make sure you have performed the following tasks:
- Enable the Google Kubernetes Engine API. Enable Google Kubernetes Engine API
- If you want to use the Google Cloud CLI for this task, install and then initialize the gcloud CLI.
- Ensure that you have the necessary permissions for Kubernetes
deprecation insights and recommendations, either with the following
basic roles
or predefined roles:
- Viewer or GKE Diagnosis Recommender Viewer: for viewing the insights and recommendations.
- Editor or GKE Diagnosis Recommender Admin: for viewing and updating the state of the insights and recommendations (e.g. dismissing a recommendation).
View deprecation insights and recommendations
You can view insights and recommendations with the Google Cloud CLI or in Google Cloud console.
gcloud
Each insight has a corresponding recommendation. Insights are
fetched with gcloud recommender insights
and recommendations are fetched with gcloud recommender recommendations
.
View the list of insights for the clusters of a specific zone (for zonal clusters) or a specific region (for regional clusters):
gcloud recommender insights list \ --insight-type=google.container.DiagnosisInsight \ --location=LOCATION \ --project=PROJECT_NAME
Replace the following:
PROJECT_NAME
: the Google Cloud project ID for the project where the cluster(s) are located.LOCATION
: the exact region or zone of the cluster. For zonal clusters, you must provide the exact zone (e.g.us-central1-c
). For regional clusters, you must provide the exact region (e.g.us-central1
).
Or, if you already have an insight ID, you can see details about the insight by running the following command:
gcloud recommender insights describe INSIGHT \ --insight-type=google.container.DiagnosisInsight \ --location=LOCATION \ --project=PROJECT_NAME
Replace the
INSIGHT
with the value of insight ID, specified at the end of the URL from thename
field for the insight.The output includes details about the timing and amount of usage of the deprecated feature, including what resource is using it.
View the list of recommendations for the cluster of a specific zone (for zonal clusters) or a specific region (for regional clusters):
gcloud recommender recommendations list \ --recommender=google.container.DiagnosisRecommender \ --location=LOCATION \ --project=PROJECT_NAME
Or, if you already have a recommendation ID, you can view the recommendation by running the following command:
gcloud recommender recommendations describe RECOMMENDATION_ID \ --location=LOCATION \ --project=PROJECT_NAME
Replace the
RECOMMENDATION_ID
with the saved value ofassociatedRecommendations.recommendation
from the command output in Step 1.The output includes a description with a link to the migration guide for the deprecation. You can also find these migration guides in the tables for Kubernetes deprecations.
Console
Go to the Google Kubernetes Engine page in console:
Check the Notifications column for specific clusters to find insights related to deprecations.
Click on the insight to reveal more information. In the revealed sidebar panel, you can see details about your cluster's exposure to the upcoming deprecation, including the recommendation for how to mitigate it.
Click the See Instructions button to see the complete migration guide for the deprecated feature or API. This migration guide is also available in the corresponding table for Kubernetes deprecations.
Dismiss deprecation insights and recommendations
If you don't want to see a Kubernetes deprecation insight and recommendation in console anymore, you can dismiss it. You might do this if, for example, you have already addressed your exposure to the deprecation, or if you don't plan on addressing it as your cluster is temporary.
If the insight and recommendation are dismissed, it will be not shown to any user viewing the cluster in console. However, it will still be discoverable with Google Cloud CLI. If the same cluster uses the same deprecated API or feature again, the recommendation will not be displayed.
Dismiss a deprecation insight and recommendation
To dismiss the insight and recommendation, follow the instructions for Viewing deprecation insights and recommendations in console to get to the sidebar panel with more details. In that panel, click the Dismiss button.
When you dismiss a recommendation, you only hide it for all users. Automatic upgrades remain paused until you migrate out of the deprecated features and GKE does not detect usage of the deprecated features for 30 consecutive days.
Restore a dismissed insight and recommendation
If needed, you can restore a dismissed insight and recommendation. Follow the instructions for Restoring a recommendation.
What's next
- To learn more about how deprecations work with GKE, see GKE deprecations.