Website: kube-apiserver cannot see its configured basic-auth file

Created on 5 Oct 2017  路  3Comments  路  Source: kubernetes/website

This is a...

  • [ ] Feature Request
  • [X] Bug Report

Problem:

kube-apiserver can't see a basic auth file that clearly exists.

Reproduction:

  1. Deploy a new cluster with kubeadm
  2. Shut down the apiserver container
  3. Create a file /etc/kubernetes/kubepasswd.csv with the contents: password,user,user
  4. Chmod this file 777
  5. Edit /etc/kubernetes/manifests/kube-apiserver.yaml
  6. Add a new line under command reading: - --basic-auth-file=/etc/kubernetes/kubepasswd.csv
  7. Save the file
  8. Note that the container is boot looping.
  9. Grab the output of docker ps -a | grep apiserver and note which container died most recently.
  10. Run docker logs against that container
  11. Note the output:
invalid authentication config: open /etc/kubernetes/kubepasswd.csv: no such file or directory

# ls -l /etc/kubernetes/kubepasswd.csv
-rwxrwxrwx 1 root root 13 Oct  4 22:23 /etc/kubernetes/kubepasswd.csv

The file exists, has open permissions, and a valid format, yet the error persists. This is an Ubuntu 16.04 machine, so SELinux is off the table, neither am I getting any Apparmor AVC messages in the syslog.

Proposed Solution:

kube-apiserver should read the file that very definitely exists

Page to Update:
n/a

Kubernetes Version:
1.8

Most helpful comment

D'oh! Wrong repo. Thanks :)

All 3 comments

Thanks for the report @Karunamon!

As I'm reading this, I looks more like an issue with Kubernetes than with the documentation on Kubernetes. If that's the case, could open an issue at https://github.com/kubernetes/kubernetes, as it likely won't get the attention you're desiring when filed against the documentation.

D'oh! Wrong repo. Thanks :)

Still may be a documentation issue as
https://stackoverflow.com/questions/46618383/how-to-config-simple-login-pass-authentication-for-kubernetes-desktop-ui
solved the problem for me. There seems to be a change in k8s 1.8

Was this page helpful?
0 / 5 - 0 ratings