Book Image

Kubernetes Secrets Handbook

By : Emmanouil Gkatziouras, Rom Adams, Chen Xi
Book Image

Kubernetes Secrets Handbook

By: Emmanouil Gkatziouras, Rom Adams, Chen Xi

Overview of this book

Securing Secrets in containerized apps poses a significant challenge for Kubernetes IT professionals. This book tackles the critical task of safeguarding sensitive data, addressing the limitations of Kubernetes encryption, and establishing a robust Secrets management system for heightened security for Kubernetes. Starting with the fundamental Kubernetes architecture principles and how they apply to the design of Secrets management, this book delves into advanced Kubernetes concepts such as hands-on security, compliance, risk mitigation, disaster recovery, and backup strategies. With the help of practical, real-world guidance, you’ll learn how to mitigate risks and establish robust Secrets management as you explore different types of external secret stores, configure them in Kubernetes, and integrate them with existing Secrets management solutions. Further, you'll design, implement, and operate a secure method of managing sensitive payload by leveraging real use cases in an iterative process to enhance skills, practices, and analytical thinking, progressively strengthening the security posture with each solution. By the end of this book, you'll have a rock-solid Secrets management solution to run your business-critical applications in a hybrid multi-cloud scenario, addressing operational risks, compliance, and controls.
Table of Contents (20 chapters)
Free Chapter
1
Part 1:Introduction to Kubernetes Secrets Management
6
Part 2: Advanced Topics – Kubernetes Secrets in a Production Environment
10
Part 3: Kubernetes Secrets Providers

Securing access to Secrets with RBAC

A cross-cutting concern when it comes to Kubernetes objects is authorized access. Overall, the state of a system is something sensitive. You should have authorized access for operations such as changing the number of replicas for a deployment or changing the autoscaling rules for a deployment. The security mechanism that Kubernetes provides us with is RBAC.

RBAC introduction

RBAC consists of the following Kubernetes objects:

  • Roles
  • Role bindings
  • Cluster roles
  • Cluster role bindings

We will check each component separately and see how they are combined with Kubernetes Secrets.

Roles

Roles are a set of permissions that take effect only on the namespace where the role resides. By specifying a role, we define operations that can be executed upon a Kubernetes resource. Roles have the following format:

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: default
  name: secret...