Skip to content

Commit

Permalink
allow to set the kubernetes log level
Browse files Browse the repository at this point in the history
allow to configure the verbosity of the logs on the kubernetes
components.

Change-Id: I338c81814c7bbd8a08ede039157f7b153ff42ba7
  • Loading branch information
aojea committed Oct 26, 2024
1 parent e451109 commit c031d76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kubetest2-ec2/config/kubeadm-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ nodeRegistration:
runtime-cgroups: /runtime.slice
kubelet-cgroups: /runtime.slice
cgroup-root: /
v: {{KUBE_LOG_LEVEL}}
---
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
Expand All @@ -29,14 +30,17 @@ apiServer:
cloud-provider: {{EXTERNAL_CLOUD_PROVIDER}}
feature-gates: {{FEATURE_GATES}}
runtime-config: {{RUNTIME_CONFIG}}
v: {{KUBE_LOG_LEVEL}}
certSANs:
- {{EXTRA_SANS}}
controllerManager:
extraArgs:
cloud-provider: {{EXTERNAL_CLOUD_PROVIDER}}
feature-gates: {{FEATURE_GATES}}
v: {{KUBE_LOG_LEVEL}}
scheduler:
extraArgs:
feature-gates: {{FEATURE_GATES}}
v: {{KUBE_LOG_LEVEL}}
networking:
podSubnet: {{POD_CIDR}}
1 change: 1 addition & 0 deletions kubetest2-ec2/config/kubeadm-join.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ nodeRegistration:
runtime-cgroups: /runtime.slice
kubelet-cgroups: /runtime.slice
cgroup-root: /
v: {{KUBE_LOG_LEVEL}}
3 changes: 3 additions & 0 deletions kubetest2-ec2/config/run-kubeadm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ if [[ ${KUBEADM_CONTROL_PLANE} == true ]]; then
KUBERNETES_VERSION=$(kubelet --version | awk '{print $2}')
sed -i "s|{{KUBERNETES_VERSION}}|$KUBERNETES_VERSION|g" /etc/kubernetes/kubeadm-init.yaml
sed -i "s|{{POD_CIDR}}|$POD_CIDR|g" /etc/kubernetes/kubeadm-init.yaml
KUBE_LOG_LEVEL=${KUBE_LOG_LEVEL:-4}
sed -i "s|{{POD_CIDR}}|$KUBE_LOG_LEVEL|g" /etc/kubernetes/kubeadm-init.yaml
sed -i "s|{{POD_CIDR}}|$KUBE_LOG_LEVEL|g" /etc/kubernetes/kubeadm-join.yaml

kubeadm init \
--v 10 \
Expand Down

0 comments on commit c031d76

Please sign in to comment.