mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #45930 from x1957/addlog
Automatic merge from submit-queue (batch tested with PRs 46801, 45184, 45930, 46192, 45563) adds log when --kubeconfig with wrong config **What this PR does / why we need it**: easy for troubleshooting I have set --kubeconfig==/etc/kubernetes/kubelet.conf when copy & paste(the file path is wrong “==/etc/kubernetes/kubelet.conf”), but kubelet start with no error log. I don't know what happend. **Release note**: ```release-note NONE ```
This commit is contained in:
commit
f294b535a0
@ -466,6 +466,8 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.KubeletDeps) (err error) {
|
||||
} else {
|
||||
if s.RequireKubeConfig {
|
||||
return fmt.Errorf("invalid kubeconfig: %v", err)
|
||||
} else if s.KubeConfig.Provided() && !standaloneMode {
|
||||
glog.Warningf("Invalid kubeconfig: %v", err)
|
||||
}
|
||||
if standaloneMode {
|
||||
glog.Warningf("No API client: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user