I use kubeadm -init to install container version k8s
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
weaveworks/weave-npc 2.5.1 789b7f496034 7 days ago 49.6MB
weaveworks/weave-kube 2.5.1 1f394ae9e226 7 days ago 148MB
k8s.gcr.io/kube-apiserver v1.13.2 177db4b8e93a 2 weeks ago 181MB
k8s.gcr.io/kube-proxy v1.13.2 01cfa56edcfc 2 weeks ago 80.3MB
k8s.gcr.io/kube-controller-manager v1.13.2 b9027a78d94c 2 weeks ago 146MB
k8s.gcr.io/kube-scheduler v1.13.2 3193be46e0b3 2 weeks ago 79.6MB
k8s.gcr.io/coredns 1.2.6 f59dcacceff4 2 months ago 40MB
k8s.gcr.io/etcd 3.2.24 3cab8e1b9802 4 months ago 220MB
k8s.gcr.io/pause 3.1 da86e6ba6ca1 13 months ago 742kB
and I create 1 master + 2 work node cluster, creation is success, k8s cluster startup and run well. However, after I deploy my containers, I found all pods is deployed to same work node. I google for a while and I found this article Scheduler Performance Tuning(https://kubernetes.io/docs/concepts/configuration/scheduler-perf-tuning/) taking about new parameter "percentageOfNodesToScore" after 1.12 and default is set to 50 and I want to change to 100. However, I try following instruction in this page but still can't change to 100 but keep stay in default value "50"
I made a scheduler_extra.conf with following content
$ cat /etc/kubernetes/scheduler_extra.conf
apiVersion: kubescheduler.config.k8s.io/v1alpha1
kind: KubeSchedulerConfiguration
algorithmSource:
provider: DefaultProvider
percentageOfNodesToScore: 100
And modify /etc/kubernetes/manifests/kube-scheduler.yaml as follow
.............
spec:
containers:
- command:
- kube-scheduler
- --address=127.0.0.1
- --kubeconfig=/etc/kubernetes/scheduler.conf
- --config=/etc/kubernetes/scheduler_extra.conf <<--- I add this line
- --leader-elect=true
....................
....................
volumeMounts: <-- I change the following lines>
- mountPath: /etc/kubernetes/
name: kubeconfig
readOnly: true
hostNetwork: true
priorityClassName: system-cluster-critical
volumes:
- hostPath:
path: /etc/kubernetes/
type: Directory
name: kubeconfig
...............
However, after kube-scheduler pod be restart ( by kubelet automatically ), I go into kube-scheduler pod but /etc/kubernetes/scheduler_extra.conf didn't be mounted into pod so that after I issue kube-scheduler --write-config-to=temp.conf and cat temp.conf, percentageOfNodesToScore still are the defaulted value "50", not the value "100" I input in scheduler_extra.conf.
I use docker ps command to show the kube-scheduler pod startup command and found scheduler_extra.conf didn't be used
$docker ps --format "{{.Names}} {{.Command}} {{.Status}}" --no-trunc | grep kube-scheduler
k8s_kube-scheduler_kube-scheduler-paymentkubermaster_kube-system_a7914e6386c7369adde3dcf67c27fed6_3 "kube-scheduler --address=127.0.0.1 --kubeconfig=/etc/kubernetes/scheduler.conf --leader-elect=true" Up 1 second
In the order word, it seems the --config parameter didn't be taken by kube-scheduler pod when it start up.
Does anyone face some issue with me or anyone know how to real pass argument into kube-scheduler pod startup command ?