Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeadm upgrade apply/node command does not recognize podLogsDir flag #3127

Closed
dipaksawle opened this issue Nov 19, 2024 · 5 comments
Closed
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@dipaksawle
Copy link

What keywords did you search in kubeadm issues before filing this one?

Answer: podLogsDir

Is this a BUG REPORT or FEATURE REQUEST?

Choose one: BUG REPORT

kubeadm version (use kubeadm version):

kubeadm version: &version.Info{Major:"1", Minor:"30", GitVersion:"v1.30.5", GitCommit:"74e84a90c725047b1328ff3d589fedb1cb7a120e", GitTreeState:"clean", BuildDate:"2024-09-12T00:17:07Z", GoVersion:"go1.22.6", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Kubernetes version (use kubectl version): v1.30.5
  • Cloud provider or hardware configuration: On-prem(Self manage cluster)
  • OS (e.g. from /etc/os-release): Oracle Enterprise Linux 8.10
  • Kernel (e.g. uname -a): Linux kubemaster 5.15.0-300.163.18.1.el8uek.x86_64 kubeadm init starts paused containers on ubuntu 16.04 #2 SMP Thu Oct 3 13:38:45 PDT 2024 x86_64 x86_64 x86_64 GNU/Linux
  • Container runtime (CRI) (e.g. containerd, cri-o): cri-o
  • Container networking plugin (CNI) (e.g. Calico, Cilium): Calico
  • Others:

What happened?

We have add podLogsDir flag in kube-cluster.conf(Which has cluster config and passed as --config flag to kubeadm command) file

[ root@kubemaster ~]# grep podLogsDir /etc/kubernetes/kube-cluster.conf
podLogsDir: "/storage/kubelet/pods"
[ root@kubemaster ~]#

When I run "kubeadm upgrade apply v1.30.5 --config=/etc/kubernetes/kube-cluster.conf -y" command, it should update this flag in "kubelet-config" Configmap as well as "/var/lib/kubelet/config.yaml" file. But its not happening.

What you expected to happen?

"kubeadm upgrade apply v1.30.5 --config=/etc/kubernetes/kube-cluster.conf -y" command should update podLogsDir: "/storage/kubelet/pods" flag in kubelet-config configmap as well as /var/lib/kubelet/config.yaml(kubelet config file)

How to reproduce it (as minimally and precisely as possible)?

Step 1: Add podLogsDir: "/storage/kubelet/pods" flag in kubeletConfiguration section in kubeadm config file. Refer below
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
staticPodPath: "/etc/kubernetes/manifests"
podLogsDir: "/storage/kubelet/pods"
tlsCertFile: "/etc/kubernetes/pki/kubelet.crt"
tlsPrivateKeyFile: "/etc/kubernetes/pki/kubelet.key"
rotateCertificates: true

Step 2: Run "kubeadm upgrade apply v1.30.5 --config=/etc/kubernetes/kube-cluster.conf -y" command

Anything else we need to know?

No.

@pacoxu
Copy link
Member

pacoxu commented Nov 22, 2024

IIRC, for upgrade apply, it will not read the kubeletConfiguration in --config.

  • kubeadm init --config will read the kubeletConfiguration from the config file and save it to the configmap kubelet-config in kube-system namespace.
  • kubeadm upgrade apply --config will read the kubeletConfiguration from the configmap directly.

@pacoxu
Copy link
Member

pacoxu commented Nov 22, 2024

See https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure/#applying-kubelet-configuration-changes.

@dipaksawle
Copy link
Author

Thank you @pacoxu
I will follow https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure/#applying-kubelet-configuration-changes

@neolit123
Copy link
Member

/support

Copy link

Hello, @dipaksawle 🤖 👋

You seem to have troubles using Kubernetes and kubeadm.
Note that our issue trackers should not be used for providing support to users.
There are special channels for that purpose.

Please see:

@github-actions github-actions bot added the kind/support Categorizes issue or PR as a support question. label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

3 participants