Skip to content

Latest commit

 

History

History
54 lines (47 loc) · 1.61 KB

File metadata and controls

54 lines (47 loc) · 1.61 KB

Scheduling

to create a new pod

kubectl create -f /tmp/kubectl-edit-ccvrq.yaml

create or update

kubectl apply -f <filename>

kubectl run <podname> --image=<imagename> --port=<port to expose> --replicas=<count> --labels="app=hazelcast,env=prod" --expose=false: If tru

to check status, limits/requests, image, labels, annotations

k describe po #pod k describe ds #daemonset

to check nodes on which po is running

k get po --wide

to schedule a pod on a specific node

add nodeName like below

apiVersion: 1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  - image: nginx
    name: nginx
  nodeName: node01

ip addresses of nodes

k get nodes -o=wide === kubelet config go to /etc/systemd/system/kubelet.service.d/ check the config something like 10-kubeadm.conf check kubelet-config typically /var/lib/kubelet/config.yaml this should have "staticPodPath"

kubelet static pod path

first "ps -eaf | grep kubelet" then check finally look for staticPodPath in the config

Schedulers

  1. it is schedul*e*r not schedul*a*r

  2. when creating new scheduler

    1. first add scheduler-name

    2. then leader-election=false under spec/command

    3. change **secure-port=0" to disable https

    4. finally change port to an unused port using "netstat -natulp tcp/udp | grep <portno>" and check source port numbers

    5. ensure the liveness probe port number is also updated

    6. schedule it on the master

    7. check kubectl get events of the pod once it is scheduled to check scheduler used.

    8. check kubectl logs <scheduler-name> to ensure it isnt waitinf leader election if there are issues with the scheduler