Skip to Content
Kubernetes Best Practices
book

Kubernetes Best Practices

by Brendan Burns, Eddie Villalba, Dave Strebel, Lachlan Evenson
November 2019
Intermediate to advanced
265 pages
6h 44m
English
O'Reilly Media, Inc.
Content preview from Kubernetes Best Practices

Chapter 4. Configuration, Secrets, and RBAC

The composable nature of containers allows us as operators to introduce configuration data into a container at runtime. This makes it possible for us to decouple an application’s function from the environment it runs in. By means of the conventions allowed in the container runtime to pass through either environment variables or mount external volumes into a container at runtime, you can effectively change the configuration of the application upon its instantiation. As a developer, it is important to take into consideration the dynamic nature of this behavior and allow for the use of environment variables or the reading of configuration data from a specific path available to the application runtime user.

When moving sensitive data such as secrets into a native Kubernetes API object, it is important to understand how Kubernetes secures access to the API. The most commonly implemented security method in use in Kubernetes is Role-Based Access Control (RBAC) to implement a fine-grained permission structure around actions that can be taken against the API by specific users or groups. This chapter covers some of the best practices regarding RBAC and also provides a small primer.

Configuration Through ConfigMaps and Secrets

Kubernetes allows you to natively provide configuration information to our applications through ConfigMaps or secret resources. The main differentiator between the two is the way a pod stores the receiving information and ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes in Production Best Practices

Kubernetes in Production Best Practices

Aly Saleh, Murat Karslioglu
Kubernetes Microservices

Kubernetes Microservices

Richard Chesterwood
Kubernetes Patterns

Kubernetes Patterns

Bilgin Ibryam, Roland Huß

Publisher Resources

ISBN: 9781492056461Errata Page