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

Auditing and logging

Google Cloud comes with logging and auditing out-of-the-box. Once we provision a Kubernetes cluster, all the operations will be visible through the logging console.

Suppose we create a secret on the cluster we provisioned previously:

$ kubectl create secret generic empty-secret

This action will be logged on the audit logs of GKE, and all we must do is search the logging console on GCP using the following query:

protoPayload.methodName="io.k8s.core.v1.secrets.create"
protoPayload.@type="type.googleapis.com/google.cloud.audit.AuditLog"
resource.type="k8s_cluster"

As a result, we should see all the operations upon accessing Secrets:

Figure 10.1 – Kubernetes audit logs on GKE

Figure 10.1 – Kubernetes audit logs on GKE

Apart from audit logs on Kubernetes, we can also utilize the audit logs on Secret Manager. On the logging screen of GCP, we can search specifically for audit logs:

resource.type="audited_resource" AND...