Kind: Document howto enable deprecated k8s APIs

Created on 20 Jan 2020  路  6Comments  路  Source: kubernetes-sigs/kind

For kubeadm I can do something like this to enable the deprecated APIs in k8s 1.16:

apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
apiServer:
  extraArgs:
    runtime-config: "apps/v1beta1=true,apps/v1beta2=true,extensions/v1beta1/daemonsets=true,extensions/v1beta1/deployments=true,extensions/v1beta1/replicasets=true,extensions/v1beta1/networkpolicies=true,extensions/v1beta1/podsecuritypolicies=true"

How would I go about creating a kind 1.16 cluster with these APIs enabled?

kindocumentation kinsupport lifecyclactive prioritimportant-soon

Most helpful comment

Thanks, adding this to the config seems to work:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    apiVersion: kubeadm.k8s.io/v1beta2
    kind: ClusterConfiguration
    apiServer:
      extraArgs:
        runtime-config: "apps/v1beta1=true,apps/v1beta2=true,extensions/v1beta1/daemonsets=true,extensions/v1beta1/deployments=true,extensions/v1beta1/replicasets=true,extensions/v1beta1/networkpolicies=true,extensions/v1beta1/podsecuritypolicies=true"

I think this is a fairly common use case, having it in the docs would be nice.

All 6 comments

kind supports patches for the kubeadm configuration:
https://kind.sigs.k8s.io/docs/user/quick-start/#enable-feature-gates-in-your-cluster

/triage support
/kind documentation

Thanks, adding this to the config seems to work:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    apiVersion: kubeadm.k8s.io/v1beta2
    kind: ClusterConfiguration
    apiServer:
      extraArgs:
        runtime-config: "apps/v1beta1=true,apps/v1beta2=true,extensions/v1beta1/daemonsets=true,extensions/v1beta1/deployments=true,extensions/v1beta1/replicasets=true,extensions/v1beta1/networkpolicies=true,extensions/v1beta1/podsecuritypolicies=true"

I think this is a fairly common use case, having it in the docs would be nice.

Thanks, adding this to the config seems to work

excellent.

I think this is a fairly common use case, having it in the docs would be nice.

docs PRs are always welcome.

with kind v0.7.0 you can do the following kind config:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
kubeadmConfigPatches:
- |
  kind: ClusterConfiguration
  apiServer:
    extraArgs:
      runtime-config: "apps/v1beta1=true,apps/v1beta2=true,extensions/v1beta1/daemonsets=true,extensions/v1beta1/deployments=true,extensions/v1beta1/replicasets=true,extensions/v1beta1/networkpolicies=true,extensions/v1beta1/podsecuritypolicies=true"

which will work for v1beta1 and v1beta2 kubeadm versions.

I think I'm probably going to add a first-class field for runtime config as it's frequently in need of patching across versions and document that instead though.

https://github.com/kubernetes-sigs/kind/pull/1816 documentation will follow this first-class runtimeConfig option

Hi, I am interested to work on this.

I think adding above examples (https://github.com/kubernetes-sigs/kind/issues/1271#issuecomment-576454373 and https://github.com/kubernetes-sigs/kind/issues/1271#issuecomment-619345727 ) and some explanations needed in the page Getting Started page: https://github.com/kubernetes-sigs/kind/blob/master/site/content/docs/user/quick-start.md#enable-feature-gates-in-your-cluster

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BenTheElder picture BenTheElder  路  30Comments

hjacobs picture hjacobs  路  31Comments

2opremio picture 2opremio  路  45Comments

neolit123 picture neolit123  路  62Comments

vincepri picture vincepri  路  83Comments