Nesta página, explicamos como o Kubernetes
portões de recursos
no Google Kubernetes Engine (GKE). Os portões de recursos são um conjunto de pares de chave-valor que habilitam os recursos do Kubernetes. Não é possível modificar os portões de recursos do Kubernetes em clusters do GKE.
O projeto do Kubernetes lança novos recursos em
fases
ao longo do tempo. Os recursos podem estar na fase Alfa, Beta ou GA.
Para conferir quais recursos estão ativados para o cluster que executa a versão 1.26 ou mais recente,
verifique o estado do feature gate.
Como alternativa, para verificar o estágio de um recurso correspondente à versão do
plano de controle ou dos nós do cluster, consulte a tabela Feature gates para recursos
Alfa
ou Beta
na documentação do Kubernetes.
Recursos do Kubernetes em GA no GKE
Os recursos em GA (também chamada de estável) do Kubernetes são ativados no GKE
por padrão e não podem ser desativados.
Recursos Beta do Kubernetes no GKE
Os recursos Beta geralmente ficam ativados por padrão no GKE.
O GKE pode desativar um recurso Beta específico de uma determinada
versão para reduzir um problema conhecido com o recurso, garantir a compatibilidade
com versões anteriores ou porque a integração e a qualificação do recurso no
GKE ainda não foram concluídas.
Se você quiser usar um recurso Beta do Kubernetes no cluster do GKE
com a versão 1.26 ou mais recente, verifique
o estado do portão de recursos para conferir se esse recurso está ativado. Se o cluster estiver executando uma
versão anterior à 1.26, teste o recurso para
verificar se ele está ativado.
Os recursos Alfa do Kubernetes estão desativados por padrão em todos os clusters do GKE. O GKE pode
ativar um recurso Alfa em uma versão específica do plano de controle.
Para ativar todos os recursos Alfa do Kubernetes, crie um
cluster Alfa padrão.
Verificar o estado do feature gate
Com clusters que executam a versão 1.26 ou mais recente, é possível executar um comando kubectl
para verificar quais recursos estão ativados.
Verifique o estado do feature gate para o cluster do GKE:
A saída, como no exemplo a seguir, mostra o nome do feature gate,
o estágio correspondente ("" é GA) e se o feature gate
está ativado. 1 significa ativado e 0 significa desativado.
Confira o seguinte exemplo de saída:
# HELP kubernetes_feature_enabled [BETA] This metric records the data about the stage and enablement of a k8s feature.
# TYPE kubernetes_feature_enabled gauge
kubernetes_feature_enabled{name="APIListChunking",stage=""} 1
kubernetes_feature_enabled{name="APIPriorityAndFairness",stage=""} 1
kubernetes_feature_enabled{name="APIResponseCompression",stage="BETA"} 1
kubernetes_feature_enabled{name="APISelfSubjectReview",stage=""} 1
kubernetes_feature_enabled{name="APIServerIdentity",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServerTracing",stage="BETA"} 1
kubernetes_feature_enabled{name="AdmissionWebhookMatchConditions",stage="BETA"} 1
...
Essa saída indica que, por exemplo, o recurso APIResponseCompression
está ativado e no estágio Beta.
A seguir
Para uma lista completa dos recursos atuais do Kubernetes, consulte Feature
gates.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-05-01 UTC."],[],[],null,["# Feature gates\n\n[Autopilot](/kubernetes-engine/docs/concepts/autopilot-overview) [Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page explains how Kubernetes\n[feature gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/)\nfunction in Google Kubernetes Engine (GKE). Feature gates are a set of key-value\npairs that toggle Kubernetes features. You can modify Kubernetes feature\ngates in GKE only with alpha clusters. For more information, see\n[Alpha clusters](/kubernetes-engine/docs/concepts/alpha-clusters).\n\nThe Kubernetes project releases new features in\n[stages](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-stages)\nover time. Features can be in the *alpha* , *beta* , or *GA* stage.\n\nTo see what features are enabled for your cluster running version 1.26 or later,\n[check the feature gate state](#check-feature-gate-state).\n\nAlternatively, to verify the stage of a feature corresponding to the version of\nyour cluster's control plane or nodes, check the [Feature gates for Alpha or\nBeta\nfeatures](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features)\ntable in the Kubernetes documentation.\n\n### GA Kubernetes features in GKE\n\nGA (also referred to as *stable* ) Kubernetes features are *enabled* on\nGKE by default and *cannot be disabled*.\n\n### Beta Kubernetes features in GKE\n\nBeta features are usually *enabled* by default in GKE.\nGKE might disable a specific beta feature for a particular\nversion to mitigate a known issue with the feature, to ensure backwards\ncompatibility, or because integration and qualification of the feature in\nGKE is not yet complete.\n\nIf you want to use a beta Kubernetes feature in your GKE cluster\nrunning version 1.26 or later, check that this feature is enabled by [checking\nthe feature gate state](#check-feature-gate-state). If your cluster is running a\nversion earlier than 1.26, you can check if the feature is enabled by testing\nthe feature.\n\n[Contact Cloud Customer Care](/support) if you can't verify whether the beta\nfeature is enabled for your GKE cluster's control plane or node\nversion.\n\n#### Kubernetes beta APIs with GKE clusters\n\nIn addition to beta Kubernetes features, you can also use Kubernetes beta APIs\nwith GKE clusters. For beta APIs that were introduced with\nversion 1.24 or later, you must configure beta APIs per resource per cluster.\nFor more information, see [Use Kubernetes beta APIs with GKE\nclusters](/kubernetes-engine/docs/how-to/use-beta-apis).\n\n### Alpha Kubernetes features in GKE\n\nAlpha Kubernetes features are disabled by default in all GKE\nclusters, except for [alpha\nclusters](/kubernetes-engine/docs/concepts/alpha-clusters). GKE\nmight enable a specific alpha feature in a specific control plane version.\n\nWith alpha clusters, all alpha feature gates available with the Kubernetes\nversion are enabled, and some beta feature gates, depending on the default\nvalue, are enabled. For more information about which feature gates are available\nwith specific versions, and which beta features are enabled by default, see\n[Feature gates for Alpha or Beta features](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features)\nin the Kubernetes documentation. You can also selectively modify specific\nfeature gates. For more information, see [Feature gates and alpha\nclusters](/kubernetes-engine/docs/concepts/alpha-clusters#feature-gates).\n\nTo enable all alpha Kubernetes features, create an\n[alpha Standard cluster](/kubernetes-engine/docs/concepts/alpha-clusters).\n| **Warning:** Alpha clusters are intended for experimental purposes and not for production workloads.\n\nCheck feature gate state\n------------------------\n\nWith clusters running version 1.26 or later, you can run a `kubectl` command\nto check what features are enabled.\n\nCheck the feature gate state for your GKE cluster:\n\n1. [Install and configure kubectl access](/kubernetes-engine/docs/how-to/cluster-access-for-kubectl)\n2. Run the following command:\n\n kubectl get --raw /metrics | grep kubernetes_feature_enabled\n\n The output, like in the following example, shows you the name of the feature\n gate, the corresponding stage (`\"\"` is GA), and whether the feature gate is\n enabled. `1` means enabled and `0` means disabled.\n\n See the following example output: \n\n # HELP kubernetes_feature_enabled [BETA] This metric records the data about the stage and enablement of a k8s feature.\n # TYPE kubernetes_feature_enabled gauge\n kubernetes_feature_enabled{name=\"APIListChunking\",stage=\"\"} 1\n kubernetes_feature_enabled{name=\"APIPriorityAndFairness\",stage=\"\"} 1\n kubernetes_feature_enabled{name=\"APIResponseCompression\",stage=\"BETA\"} 1\n kubernetes_feature_enabled{name=\"APISelfSubjectReview\",stage=\"\"} 1\n kubernetes_feature_enabled{name=\"APIServerIdentity\",stage=\"BETA\"} 1\n kubernetes_feature_enabled{name=\"APIServerTracing\",stage=\"BETA\"} 1\n kubernetes_feature_enabled{name=\"AdmissionWebhookMatchConditions\",stage=\"BETA\"} 1\n ...\n\n This output indicates that, for example, the `APIResponseCompression`\n feature is enabled and in the beta stage.\n\nWhat's next\n-----------\n\n- For a complete list of current Kubernetes features, see [Feature\n gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features).\n- For a full list of GKE features, refer to the [GKE release notes](/kubernetes-engine/docs/release-notes)."]]