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

Move resolve.conf setting to Kubelet config file #2162

Closed
NeilW opened this issue Jun 3, 2020 · 5 comments
Closed

Move resolve.conf setting to Kubelet config file #2162

NeilW opened this issue Jun 3, 2020 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@NeilW
Copy link

NeilW commented Jun 3, 2020

BUG REPORT

Versions

kubeadm version (use kubeadm version):

# kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:49:29Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Kubernetes version (use kubectl version):
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:52:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:43:34Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

What happened?

kubelet is logging a deprecation error on both the control plane and the worker nodes

Flag --resolv-conf has been deprecated, This parameter should be set via the config file

What you expected to happen?

The "resolvConf" entry in the KubeletConfiguration should be set to the correct value and the flag removed from /var/lib/kubelet/kubeadm-flags.env

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

Install k8s master node using kubeadm, add in a worker using kubeadm join.

Anything else we need to know?

Upgraded kubelet files from 1.16.X have a resolvConf: /etc/resolv.conf entry in the config file, which is currently overridden by the command line flag. Upgrades may be doing things differently from installs.

@neolit123
Copy link
Member

hello, this seems already resolved by:
kubernetes/kubernetes#90394
?

xref #2111

/kind feature
/priority awaiting-more-evidence

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Jun 4, 2020
@neolit123
Copy link
Member

^ also note for 1.18 we have "action required" for users to manually remove the flag from existing files.

@NeilW
Copy link
Author

NeilW commented Jun 4, 2020

Doesn't appear to be. This is the result of a fresh 1.18 install.

[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Starting the kubelet
ubuntu@srv-9nzt6:~$ sudo cat /var/lib/kubelet/kubeadm-flags.env
KUBELET_KUBEADM_ARGS="--cloud-provider=external --container-runtime=remote --container-runtime-endpoint=/run/containerd/containerd.sock --resolv-conf=/run/systemd/resolve/resolv.conf"
ubuntu@srv-9nzt6:~$ sudo cat /var/lib/kubelet/config.yaml
apiVersion: kubelet.config.k8s.io/v1beta1
authentication:
  anonymous:
    enabled: false
  webhook:
    cacheTTL: 0s
    enabled: true
  x509:
    clientCAFile: /etc/kubernetes/pki/ca.crt
authorization:
  mode: Webhook
  webhook:
    cacheAuthorizedTTL: 0s
    cacheUnauthorizedTTL: 0s
cgroupDriver: systemd
clusterDNS:
- 172.30.0.10
clusterDomain: cluster.local
cpuManagerReconcilePeriod: 0s
evictionPressureTransitionPeriod: 0s
fileCheckFrequency: 0s
healthzBindAddress: 127.0.0.1
healthzPort: 10248
httpCheckFrequency: 0s
imageMinimumGCAge: 0s
kind: KubeletConfiguration
nodeStatusReportFrequency: 0s
nodeStatusUpdateFrequency: 0s
rotateCertificates: true
runtimeRequestTimeout: 0s
staticPodPath: /etc/kubernetes/manifests
streamingConnectionIdleTimeout: 0s
syncFrequency: 0s
volumeStatsAggPeriod: 0s

@neolit123
Copy link
Member

@NeilW the fix will be in 1.19 and we cannot backport to 1.18.

@NeilW
Copy link
Author

NeilW commented Jun 4, 2020

ok

@NeilW NeilW closed this as completed Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

3 participants