如何在GKE集群上启用准入控制器? [英] How to enable admission controller on a GKE cluster?
问题描述
我想调查GKE群集上nginx-ingress
的问题.因此,我需要启用准入控制器,并且想知道在GKE上是否可行.我正在使用
I'd like to investigate an issue with nginx-ingress
on a GKE cluster. Therefore I need to enable admission controller and was wondering whether this is possible on GKE. I'm creating the cluster with
[authentication boilerplate]
gcloud container clusters create cluster-name --machine-type=n1-standard-1 --no-enable-stackdriver-kubernetes --no-enable-autoupgrade --preemptible
在gcloud --help
或gcloud container clusters create --help
中找不到任何选项.
I find no option in gcloud --help
or gcloud container clusters create --help
.
我需要为服务帐户启用准入控制器.
I need to enable the admission controller for service accounts.
推荐答案
您可以像这样使用gcloud beta:
You can use gcloud beta like this:
gcloud beta container clusters create [CLUSTER_NAME] --enable-pod-security-policy
或者您可以使用更新:
gcloud beta container clusters update [CLUSTER_NAME] --enable-pod-security-policy
> 此页面 解释了如何在Google Kubernetes Engine中使用PodSecurityPolicies.
This page explains how to use PodSecurityPolicies in Google Kubernetes Engine.
这篇关于如何在GKE集群上启用准入控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!