0

I'd like to create a kubeadm config file(kubeadm.yaml), which can be used for multiple nodes by kubeadm init --config kubeadm.yaml.

The problem I am facing now is that, I want to set horizontal-pod-autoscaler-use-rest-clients into the config file. But kubeadmin 1.14.1 reports the errors stated below:

[root@testhost k8s]# kubeadm init --config kubeadm.yaml
W0417 12:54:19.923171    2745 strict.go:54] error unmarshaling configuration schema.GroupVersionKind{Group:"kubeadm.k8s.io", Version:"v1beta1", Kind:"InitConfiguration"}: error unmarshaling JSON: while decoding JSON: json: unknown field "controllerManager"
[init] Using Kubernetes version: v1.14.1
[preflight] Running pre-flight checks

kubeadm.yaml:

apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
controllerManager:
  ExtraArgs:
    horizontal-pod-autoscaler-use-rest-clients: "true"
    horizontal-pod-autoscaler-sync-period: "10s"
    node-monitor-grace-period: "10s"

Kubernetes RPMs installed:

kubernetes-cni-0.7.5-0.x86_64
kubeadm-1.14.0-0.x86_64
kubelet-1.14.0-0.x86_64
kubectl-1.14.0-0.x86_64

OS version: CentOS Linux release 7.6.1810 (Core)

Appreciate if anyone can help me out.

1
  • Just found at kubernetes.io/docs/tasks/debug-application-cluster/…, it suggest to ask Kubernetes questions in stackoverflow. With best of my knowledge, stack overflow is only for coding questions. Even when initiating the wizard to ask a question in stack community, it will navigate me to superuser which is dedicated for software problems. Confused now... If no help received here in next couple days, I will close it and try to raise it in stack overflow...
    – mtv_piba
    Apr 17, 2019 at 18:36

1 Answer 1

0
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
kubernetesVersion: v1.14.1
networking:
    podSubnet: "192.168.0.0/16"
controllerManager:
  extraArgs:
    horizontal-pod-autoscaler-use-rest-clients: "true"
    horizontal-pod-autoscaler-sync-period: "10s"
    node-monitor-grace-period: "10s"

Wasn't able to get your file to work using the kind: InitConfiguration but was able to with the ClusterConfiguration

4
  • Hi Ralph Bankston, welcome to SuperUser! Do you have any explanation as of why this is the needed change? Could you point out to some documentation and explanation about why this is what's expected as an answer? That way your answer may be more useful to the OP and to future users that come here searching for a solution.
    – ssice
    Apr 17, 2019 at 21:37
  • Have not used the initconfiguration method but you if you do a kubeadm init and then once that single node cluster was up you can do kubeadm config view to get the proper formatting for most of the kubeadm config values. Apr 18, 2019 at 22:04
  • Thank you Ralph for helping! I am still in progress to get my cluster up, will verify it when reach there.
    – mtv_piba
    Apr 21, 2019 at 4:38
  • Thanks but somehow I can't vote it up due to my low rep points... Thanks anyway.
    – mtv_piba
    Jun 24, 2019 at 0:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .