Kubeadm: failed to create cluster with SCTPSupport=true

Created on 12 Sep 2018  路  8Comments  路  Source: kubernetes/kubeadm

Is this a request for help?

If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.

If no, delete this section and continue on.

What keywords did you search in kubeadm issues before filing this one?

If you have found any duplicates, you should instead reply there and close this page.

If you have not found any duplicates, delete this section and continue on.

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

kubeadm version (use kubeadm version):
kubeadm version: &version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.0-beta.2", GitCommit:"0cafd04160ff4e5c16bb38d0e4ecae805c84d41c", GitTreeState:"clean", BuildDate:"2018-09-11T22:59:07Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.0-beta.2", GitCommit:"0cafd04160ff4e5c16bb38d0e4ecae805c84d41c", GitTreeState:"clean", BuildDate:"2018-09-11T23:02:06Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
    The connection to the server localhost:8080 was refused - did you specify the right host or port?
  • Cloud provider or hardware configuration: VMs on Google Cloud
  • OS (e.g. from /etc/os-release): CentOS Linux 7 (Core)
  • Kernel (e.g. uname -a): Linux stepin-master-1 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Others:

What happened?

I'm trying to create cluster with SCTP support:

$ kubeadm init  --feature-gates SCTPSupport=true
unrecognized feature-gate key: SCTPSupport

or

$ /usr/bin/kubeadm init --kubernetes-version v1.12.0-beta.2 --feature-gates SCTPSupport=true
unrecognized feature-gate key: SCTPSupport

$ /usr/bin/kubeadm init --kubernetes-version v1.12.0-beta.2 --feature-gates SCTPSupport
missing bool value for feature-gate key:SCTPSupport

I see this gate in sources: https://github.com/kubernetes/kubernetes/blob/v1.12.0-beta.2/pkg/features/kube_features.go#L375

What you expected to happen?

Cluster with SCTP support is created.

How to reproduce it (as minimally and precisely as possible)?

kubeadm init  --feature-gates SCTPSupport=true

Anything else we need to know?

Most helpful comment

@stepin
as @fabriziopandini noted,

write the following in a config.yaml file:

apiVersion: kubeadm.k8s.io/v1alpha3
kubernetesVersion: v1.12.0-beta.2
kind: ClusterConfiguration
apiServerExtraArgs:
  feature-gates: SCTPSupport=true

start kubeadm init with:

kubeadm init .... --config config.yaml

we are in the process of updating the documentation for this in 1.12.

please, re-open for more questions.

All 8 comments

Hi @stepin and thank you for submitting this issue!

Unfortunately, this feature gate is not supported directly by kubeadm.
The feature gate in question is used with pod specs. I think, that you can get more info on how it's meant to be used at SIG-node's slack channel.

As I understand, it's not about feature gate internals: it just says that kubeadm don't know about this gate. So, my idea was that kubeadm uses some other (or outdated on build servers) list of feature gates.

PS. I'm used other feature gates and looks like syntax is ok. Or it's special for alpha features?

Yes, kubeadm has its own list of supported feature gates. To make things slightly more complex, different subcommands may support different subsets of these feature gates. To be sure what is supported and where, you can use the command line help. So, for example, for kubeadm init you get:

$ kubeadm init --help
...
      --feature-gates string                 A set of key=value pairs that describe feature gates for various features. Options are:
                                             Auditing=true|false (ALPHA - default=false)
                                             CoreDNS=true|false (default=true)
                                             DynamicKubeletConfig=true|false (BETA - default=false)
...

Hello, Indeed, the SCTPSupport feature gate was not introduced for kubeadm with the SCTP PR. In order to take the feature into use this feature gate has to be configured with "true" value for the kube-apiserver.

@stepin if you want to enable kube-apiserver features gate you can do this using the kubeadm config file and assigning extra args to the API server component

@stepin
as @fabriziopandini noted,

write the following in a config.yaml file:

apiVersion: kubeadm.k8s.io/v1alpha3
kubernetesVersion: v1.12.0-beta.2
kind: ClusterConfiguration
apiServerExtraArgs:
  feature-gates: SCTPSupport=true

start kubeadm init with:

kubeadm init .... --config config.yaml

we are in the process of updating the documentation for this in 1.12.

please, re-open for more questions.

Thanks a lot to all.

It was confusing that feature gates are enabled on per component basis. For example, this page https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/ has list of feature gates (for stable release) but it don't specify what components should be configured to enable particular feature. Maybe adding extra column with components list (and kubeadm key like apiServerExtraArgs) will help some people in future.

@stepin
i'm sorry for the confusion, we do have documentation about passing custom flag to control plane components from kubeadm:
https://kubernetes.io/docs/setup/independent/control-plane-flags/

but we do not cover, say how to pass a feature gate to the api server explicitly.

on the other hand, feature gates are also exposed as command line flags and they are available in the CLI reference too:
https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/

Was this page helpful?
0 / 5 - 0 ratings