k8s 1.16: basic auth doesn't work

Bug #1841199 reported by George Kraft
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kubernetes Control Plane Charm
Fix Released
Critical
George Kraft

Bug Description

Running cs:charmed-kubernetes-220 with k8s 1.16.0-beta.0, kubectl calls fail with:

error: You must be logged in to the server (Unauthorized)

This is happening because kube-apiserver's --basic-auth-file option has been deprecated[1]. It's still usable, but since the option no longer appears in kube-apiserver help output, the kube-apiserver snap[2] no longer passes the config through to kube-apiserver.

It is unclear when basic auth support will be removed entirely.

I see two potential short term fixes:
1. Manually add the basic-auth-file arg to the kube-apiserver snap.
2. Update the charm to do all configuration through the "args" option, which does not depend on help output.

But the obvious fix, and the only long term one, is to stop using basic auth. We already use token auth in some places. We'll just need to use it everywhere we currently use basic auth.

[1]: https://github.com/kubernetes/kubernetes/pull/81152
[2]: https://git.launchpad.net/snap-kube-apiserver/tree/

Revision history for this message
George Kraft (cynerva) wrote :

I'm gonna go ahead and do one of the short-term fixes so we can get 1.16 working ASAP.

Changed in charm-kubernetes-master:
assignee: nobody → George Kraft (cynerva)
status: New → In Progress
Revision history for this message
George Kraft (cynerva) wrote :

I've split this up into two issues. This issue will be focused on getting basic auth to work with 1.16, even though it's deprecated. For long-term handling of basic auth's deprecation, see https://bugs.launchpad.net/charm-kubernetes-master/+bug/1841226

summary: - k8s 1.16: basic auth is deprecated
+ k8s 1.16: basic auth doesn't work
Changed in charm-kubernetes-master:
milestone: none → 1.16
importance: Undecided → Critical
Revision history for this message
George Kraft (cynerva) wrote :
Changed in charm-kubernetes-master:
status: In Progress → Fix Committed
Revision history for this message
George Kraft (cynerva) wrote :

Fix is available in edge with cs:~containers/kubernetes-master-735

Changed in charm-kubernetes-master:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.