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

Introduction to Workload Identity

Workload Identity on AKS on Azure enables us to assign permissions to Kubernetes workloads so they can interact with Azure resources. For example, we have an Azure Key Vault that we use to store sensitive information. To interact with Azure Key Vault, we need some form of credentials. Workload Identities are machine identities representing software workloads that require identities to interact with Azure resources. Instead of creating an identity or a service principal, we can use Workload Identity by manually attaching their credentials to the service. This way, each service can have its own identity and authenticate by itself.

In Kubernetes, we can assign a Workload Identity to our Pods. By granting the RBAC permissions to this identity, we will be able to interact with Azure Key Vault.

Here is an example of how Workload Identity works:

Figure 9.2 –  Workload Identity behind the scenes (source: https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview?tabs=dotnet)

Figure 9.2 – Workload Identity behind the scenes (source: https://learn...