Need some help about enabling PodPreset on GKE, however I don't find kube-apiserver on the gcloud shell

8/1/2019

networkandcode:~ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE networkandcode:~ kube-apiserver -bash: kube-apiserver: command not found

-- Shakir Ahmed Ibrahim
google-kubernetes-engine

2 Answers

8/2/2019

This API needs to be enabled on the master, which is currently not on GKE. There is no way for you to make this change or for you to enable it.

You can use kubectl api-resources and kubectl api-versions to see what is enabled on the cluster; by running these commands you will see that the settings.k8s.io API is not enabled.

You can try creating an alpha GKE cluster to see if the API is enabled there, however, these clusters are not meant to be used for more than a month and definitely not in production. Instead, I would recommend creating a feature request to have this resource and API added to future versions of GKE

-- Patrick W
Source: StackOverflow

4/3/2020

You can deploy the PodPreset mutating admission webhook: https://github.com/redhat-cop/podpreset-webhook

The MutatingAdmssisonWebhook admission controller is enabled on GKE by default.

-- dippynark
Source: StackOverflow