Kubernetes simple authentication

孤街醉人 提交于 2019-12-04 13:06:50

If you want your users to authenticate using HTTP Basic Auth (user:password), you can add:

--basic-auth-file=/basic_auth.csv

to your kube-apiserver command line, where each line of the file should be password, user-name, user-id. E.g.:

@dm1nP@ss,admin,admin
w3rck3rP@ss,wercker,wercker
etc...

If you'd rather use access tokens (HTTP Authentication: Bearer), you can specify:

--token-auth-file=/known-tokens.csv

where each line should be token,user-name,user-id[,optional groups]. E.g.:

@dm1nT0k3n,admin,admin,adminGroup,devGroup
w3rck3rT0k3n,wercker,wercker,devGroup
etc...

For more info, checkout the Authentication docs. Also checkout example_policy_file.jsonl for an example ABAC file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!