1. What is the name of the POD that deploys the default kubernetes scheduler in this environment?
-master $ kubectl get pods --namespace=kube-system
NAME READY STATUS RESTARTS AGE
coredns-66bff467f8-dbnft 1/1 Running 0 43m
coredns-66bff467f8-gq8nw 1/1 Running 0 43m
etcd-master 1/1 Running 0 43m
katacoda-cloud-provider-58f89f7d9-t978s 0/1 CrashLoopBackOff 13 43m
kube-apiserver-master 1/1 Running 0 43m
kube-controller-manager-master 1/1 Running 0 43m
kube-flannel-ds-amd64-4xjbh 1/1 Running 0 43m
kube-flannel-ds-amd64-xs95v 1/1 Running 1 42m
kube-keepalived-vip-bchtm 1/1 Running 0 42m
kube-proxy-4qblt 1/1 Running 0 42m
kube-proxy-dswp9 1/1 Running 0 43m
kube-scheduler-master 1/1 Running 0 43m
Based on these , the answer seems to be kube-schdeuler-master.
2.What is the image used to deploy the kubernetes scheduler? Inspect the kubernetes scheduler pod and identify the image
master $ kubectl describe pod --namespace=kube-system kube-scheduler-master | grep -i image
Image: k8s.gcr.io/kube-scheduler:v1.18.0
Image ID: docker-pullable://k8s.gcr.io/kube-scheduler@sha256:33063bc856e99d12b9cb30aab1c1c755ecd458d5bd130270da7c51c70ca10cf6
Deploy an additional scheduler to the cluster following the given specification.
Use the manifest file used by kubeadm tool. Use a different port than the one used by the current one.
kube-apiserver.yaml kube-scheduler.yaml
master $ vi /etc/kubernetes/manifests/kube-scheduler.yaml
master $ vi /var/answers/my-scheduler.yaml
master $ cp /etc/kubernetes/manifests/kube-scheduler.yaml my-scheduler.yaml
master $ vi my-scheduler.yaml
Make few changes like name, port number and save it.
master $ vi my-scheduler.yaml
master $ vi my-scheduler.yaml
master $ kubectl apply -f my-scheduler.yaml
A pod definition file is given. Use it to create a POD with with the new custom scheduler. File is located at /root/nginx-pod.yaml
-- Go to the yaml file and under spec section add schedulerName: my-custom-scheduler
and then run kubectl apply -f /root/nginx.yaml
No comments:
Post a Comment