본문 바로가기

CKA &. CKAD/Scheduling

Configuring Kubernetes Scheduler

ㅁ Deploy Additional Scheduler

wget https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/linux/amd64/kube-scheduler

kube-scheduler.service

ExecStart=/usr/local/bin/kube-scheduler \\
  --config=/etc/kubernetes/config/kube-scheduler.yaml \\
  --scheduler-name=default-scheduler

my-custom-scheduler.service

ExecStart=/usr/local/bin/kube-scheduler \\
  --config=/etc/kubernetes/config/kube-scheduler.yaml \\
  --scheduler-name=my-custom-scheduler

 

Deploy Additional Scheduler - kubeadm

 

/etc/kubernetes/manifests/kube-scheduler.yaml

apiVersion: v1
kind: Pod
metadata:
  name: kube-scheduler
  namepsace: kube-system
spec:
  containers:
  - command:
    - kube-scheduler
    - --address=127.0.0.1
    - --kubeconfig=/etc/kubernetes/scheduler.conf
    - --leader-elect=true
    image: k8s.gcr.io/kube-scheduler-amd64:v1.11.3
    name: kube-scheduler

 

my-custom-scheduler.yaml

apiVersion: v1
kind: Pod
metadata:
  name: my-custom-scheduler
  namepsace: kube-system
spec:
  containers:
  - command:
    - kube-scheduler
    - --address=127.0.0.1
    - --kubeconfig=/etc/kubernetes/scheduler.conf
    - --leader-elect=true
    - --scheduler-name=my-custom-scheduler
    - --lock-object-name=my-custom-scheduler
    
    image: k8s.gcr.io/kube-scheduler-amd64:v1.11.3
    name: kube-scheduler

 

Reference

 

https://github.com/kubernetes/community/blob/master/contributors/devel/scheduler.md 

https://kubernetes.io/blog/2017/03/advanced-scheduling-in-kubernetes/ 

 

Advanced Scheduling in Kubernetes

Editor’s note: this post is part of a series of in-depth articles on what's new in Kubernetes 1.6 The Kubernetes scheduler’s default behavior works well for most cases -- for example, it ensures that pods are only placed on nodes that have sufficient f

kubernetes.io

https://jvns.ca/blog/2017/07/27/how-does-the-kubernetes-scheduler-work/

https://stackoverflow.com/questions/28857993/how-does-kubernetes-scheduler-work 

 

How does Kubernetes' scheduler work?

How does Kubernetes' scheduler work? What I mean is that Kubernetes' scheduler appears to be very simple? My initial thought is that this scheduler is just a simple admission control system, not a...

stackoverflow.com

 

'CKA &. CKAD > Scheduling' 카테고리의 다른 글

Application Logs  (0) 2021.03.26
Multiple Schedulers and Practice Test  (0) 2021.03.26
Practice Test - Static Pods  (0) 2021.03.26
Practice Test - Daemon Sets  (0) 2021.03.26
Practice Test - Resource Limits  (0) 2021.03.26