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.
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.
BUG REPORT
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:
kubectl version):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/LinuxI'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
Cluster with SCTP support is created.
kubeadm init --feature-gates SCTPSupport=true
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/
Most helpful comment
@stepin
as @fabriziopandini noted,
write the following in a
config.yamlfile:start
kubeadm initwith:we are in the process of updating the documentation for this in 1.12.
please, re-open for more questions.