For the complete documentation index, see llms.txt. This page is also available as Markdown.

How To Enable Debug Log for Kube-APIserver on an Existing Cluster

Problem

How to enable debug logs on an existing Cluster.

Environment

  • Platform9 Managed Kubernetes (PMK) - All Versions

Procedure

The default Kube-APIserver container debug value is 2. This can be modified using the steps outlined on the master node part of the cluster.

  1. Backup the original master.yaml file (PMK's default configuration file retrieved from the default template "/opt/pf9/pf9-kube/conf/masterconfig/base/centos/master.yaml") to some other location on the node.

# cp /etc/pf9/kube.d/pod-manifests/master.yaml /root/
  1. Check default value for the Kube-APIserver container on k8s-master- pod. Using "kubectl describe pod k8s-master-<Matser-IP>" command. Here, by default the value is 2

# kubectl describe po k8s-master-<master-IP> -n kube-system
Name:                 k8s-master-<master-IP>
Namespace:            kube-system
Node:                 <Node-IP>
..
Containers:
  kube-apiserver:
     Command:
       --v=2
  1. Now, verify the change on Kube-API server container on k8s-master- pod using Kubectl describe command.

  1. Once you are done with the troubleshooting, please revert the debug level to 2 as higher debug level will capture many logs and utilise the pod resources.

Last updated