Kubernetes simple authentication Kubernetes simple authentication kubernetes kubernetes

Kubernetes simple authentication


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,adminw3rck3rP@ss,wercker,werckeretc...

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,devGroupw3rck3rT0k3n,wercker,wercker,devGroupetc...

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