Secure Kubernetes API

10/16/2015

I'm a bit disturbed on how to secure the kubernetes API for call and access, also Kube-ui is available to everybody. How can I set credential to secure all the services ?

Thank you

-- Julien Du Bois
kubernetes

1 Answer

10/16/2015

The Kubernetes API supports multiple forms of authentication: http basic auth, bearer token, client certificates. When launching the apiserver, you can enable / disable each of these authentication methods with command line flags.

You should also be running the apiserver where the insecure port is only accessible to localhost, so that all connections coming across the network use https. By having your api clients verify the TLS certificate presented by the apiserver, they can verify that the connection is both encrypted and not susceptible to man-in-the-middle attacks.

By default, anyone who has access credentials to the apiserver has full access to the cluster. You can also configure more fine grained authorization policies which will become more flexible and configurable in future Kubernetes releases.

-- Robert Bailey
Source: StackOverflow