Enable Scheduler Container Logs to Track Pod Placement

Problem

There is a requirement to track down the scheduling of the pods in the PMK cluster. The pod scheduling is not logged in the container logs located at /var/log/containers by default.

Environment

  • Platform9 Managed Kubernetes - All Versions

  • Kube-Scheduler

Procedure

circle-exclamation
  • Stop Hostagent and Nodeletd.

systemctl stop pf9-{hostagent,nodeletd}
  • Stop Nodelet Phases.

/opt/pf9/nodelet/nodeletd phases stop
  • Edit _ _/opt/pf9/pf9-kube/conf/masterconfig/base/<OS_NAME>/master.yaml on all the master nodes, setting the verbosity level to "--v=8" for the scheduler container command, e.g.

- name: "kube-scheduler"
      image: "k8s.gcr.io/kube-scheduler:__KUBERNETES_VERSION__"
      command:
        - "kube-scheduler"
        - "--config=/srv/kubernetes/configs/kube-scheduler.yaml"
        - "--leader-elect=true"
        - "--profiling=false"
        - "--v=8"
  • Start Hostagent

  • Verify the change

circle-check

Last updated