-
Notifications
You must be signed in to change notification settings - Fork 40k
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 kube-proxy to use authed-port instead of readonly-port. #5917
Comments
cmd/kube-proxy/app/server.go does Options:
|
The motivation for deprecating kubernetes_auth files is mainly that they complicate loading rules when used with kubeconfig files. Even if they didn't, I think there is value in having one consistent way of storing and loading auth config, and that way should probably be kubeconfig. I would go with 4. It should be fairly easy to have the kubeproxy load the token from a kubeconfig file, and change the salt rule to manage a kubeconfig file instead of a kubernetes_auth file. |
Should I do
If the second one, what do I say for the cluster name? Not sure that is readily available in the place where I want to generate this file. Can I do:
|
You can load a kubeconfig directly from a single file using:
|
@erictune, it's probably simplest to just load the auth bits from kubeconfig to start. We can consider loading endpoint data (i.e. "cluster") for the master later if it makes it cleaner. You could specify an
Then in config := clientcmd.LoadFromFile("/path/to/kubeconfig")
token := config.AuthInfos["kubelet"].Token @deads2k, is the loader actually necessary if you just want to load a single file without merge rules? I think the above should work fine, but pls correct if I'm wrong. |
@jlowdermilk |
@jlowdermilk |
@deads2k @jlowdermilk |
Oh, I need to do:
and then do: Wow that is a lot of work to make a client! |
The minimum file that is usable appears to be this:
A bit more verbose that I had hoped for. |
If you have a config in memory, you can use |
been working on this for last few days. just hitting one stumbling block after another with salt and startup scripts. |
Fixed by #7303 |
Want to retire readonly port. Also wanted by GKE.
--master=http://" + grains.api_servers + ":7080
to--master=https://" + grains.api_servers + ":6443
, etcfs.StringVar(&s.AuthPath, "auth_path", s.AuthPath, "Path to .kubernetes_auth file, specifying how to authenticate to API server.")
to proxy command.cmd/kubelet/app/server.go:236: authInfo, err := clientauth.LoadFromFile(s.AuthPath)
to proxy cmd.`.{% set auth_path = "--auth_path=/var/lib/kubelet/kubernetes_auth" -%}
Bonus: fix other distros.
The text was updated successfully, but these errors were encountered: