Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document howto enable deprecated k8s APIs #1271

Open
nbartos opened this issue Jan 20, 2020 · 10 comments
Open

Document howto enable deprecated k8s APIs #1271

nbartos opened this issue Jan 20, 2020 · 10 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@nbartos
Copy link

nbartos commented Jan 20, 2020

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?

@neolit123
Copy link
Member

neolit123 commented Jan 20, 2020

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

@k8s-ci-robot k8s-ci-robot added kind/support Categorizes issue or PR as a support question. kind/documentation Categorizes issue or PR as related to documentation. labels Jan 20, 2020
@nbartos
Copy link
Author

nbartos commented Jan 20, 2020

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.

@neolit123
Copy link
Member

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.

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 19, 2020
@BenTheElder
Copy link
Member

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.

@kubernetes-sigs kubernetes-sigs deleted a comment from fejta-bot Apr 25, 2020
@BenTheElder BenTheElder removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 25, 2020
@BenTheElder BenTheElder added this to the v0.9.0 milestone Apr 25, 2020
@BenTheElder BenTheElder added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 26, 2020
@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 25, 2020
@kubernetes-sigs kubernetes-sigs deleted a comment from fejta-bot Jul 25, 2020
@BenTheElder BenTheElder removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 25, 2020
@BenTheElder BenTheElder added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Aug 26, 2020
@BenTheElder
Copy link
Member

#1816 documentation will follow this first-class runtimeConfig option

@ghost
Copy link

ghost commented Nov 7, 2020

Hi, I am interested to work on this.

I think adding above examples (#1271 (comment) and #1271 (comment) ) 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

@k8s-ci-robot k8s-ci-robot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. labels Feb 5, 2021
@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 7, 2021
@BenTheElder BenTheElder added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Mar 11, 2021
@kubernetes-sigs kubernetes-sigs deleted a comment from fejta-bot Mar 11, 2021
@kubernetes-sigs kubernetes-sigs deleted a comment from fejta-bot Mar 11, 2021
@BenTheElder
Copy link
Member

kind v0.9.0+ has a runtimeConfig option now. It is documented at https://kind.sigs.k8s.io/docs/user/configuration/#runtime-config

A note about enabling / disabling k8s APIs probably belongs here.

@BenTheElder BenTheElder added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed kind/support Categorizes issue or PR as a support question. labels Mar 11, 2021
@atoato88
Copy link
Contributor

atoato88 commented Jun 4, 2021

Is this issue still open?

As @BenTheElder says in previous comment, there is a contents about runtimeConfig at here.
So I think this issue can be closed, but I think that it's friendly to write more details about specifing multiple APIs discussed here.

update site/content/docs/user/configuration.md as follows:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
runtimeConfig:
+  # You can specify multiple APIs.
  "api/alpha": "false"
+  "api/beta": "true"
+ ...

If it's OK, I will create PRs update like that.

@BenTheElder
Copy link
Member

i think showing multiple sounds good. we should probably specifically mention enabling a deprecated API though per this issue, though increasingly that will not be available in kubernetes anyhow as there's been effort to stabilize the APIs and move to GA + remove anything still deprecated ...

@atoato88
Copy link
Contributor

atoato88 commented Jun 4, 2021

Yes, I agree with your comments.
My intent was just more detailed yaml structures about runtimeConfig.

Sorry for my comment if my comment isn't target for this PR.

@BenTheElder BenTheElder removed this from the v0.9.0 milestone Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

5 participants