Chapter 10. Cloud Custodian and Kubernetes
In the Preface, I discussed how I started using PaC solutions for cloud computing infrastructure as a service with Cloud Custodian. As it turns out, Cloud Custodian—known as c7n among its community members—also supports Kubernetes use cases.
C7n is an open source project written in Python that was created by folks at Capital One in 2016. I was at Capital One then, and we were looking for tools to create guardrails in our AWS accounts. I am not exaggerating when I say that c7n substantially helped our teams prevent unwanted behavior in the cloud. C7n was originally designed to apply compliance and governance controls to our AWS accounts and resources. Support for other cloud providers, such as Microsoft Azure and GCP, followed later, as did Kubernetes support.
Since the c7n project is written in Python, users and developers can take advantage of the rich Python ecosystem. In fact, I used the c7n source to gain a better understanding of Boto3, the AWS SDK for Python. The c7n policy language is YAML based, with a rich schema that is accessed similarly to how kubectl explain exposes the Kubernetes API.
The following links will help you gain more information about c7n:
Let’s get started with the c7n CLI tools for Kubernetes.
CLI Mode
As a Kubernetes PaC solution, c7n includes a rich CLI with which users can interface to Kubernetes ...
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.
Read now
Unlock full access