how to enable resource EphemeralContainers in Rancher kubernetes

5/11/2020

I want to enable EphemeralContainers by setting this --feature-gates=EphemeralContainers=true in below files based on the steps given in this link https://www.shogan.co.uk/kubernetes/enabling-and-using-ephemeral-containers-on-kubernetes-1-16/

  • /etc/kubernetes/manifests/kube-apiserver.yaml
  • /etc/kubernetes/manifests/kube-scheduler.yaml

But there is no such files under etc/kubernetes , Kubernetes is setup through Rancher. Any idea where i can set the value in rancher k8

-- tina
containers
kubernetes
kubernetes-pod
rancher

1 Answer

5/11/2020

You need to pass extra_args by editing cluster.yml.

Here is a sample snippet:

services:
    kube-api:
      service_node_port_range: 30000-32767
      pod_security_policy: false
      extra_args:
        feature-gates: "EphemeralContainers=true"
    kube-scheduler:
      extra_args:
        feature-gates: "EphemeralContainers=true"

Reference:

-- leodotcloud
Source: StackOverflow