Custodian Kubernetes Support
Cloud Custodian can run policies directly inside your cluster, reporting on resources that violate those policies, or blocking them altogether.
Running the server
c7n-kube can be run and installed via poetry. poetry install && poetry run c7n-kube.
| name | default | description |
|---|---|---|
| --host | 127.0.0.1 | (optional) The host that the server should listen on. |
| --port | 8800 | (optional) The port the server will listen on. |
| --policy-dir | Path to the policy directory. | |
| --on-exception | warn | Action to take on an internal exception. One of: warn, deny. |
| --cert | Path to the certificate. | |
| --ca-cert | Path to the CA's certificate. | |
| --cert-key | Path to the certificate's key. |
Generate a MutatingWebhookConfiguration
After the server is running, you'll need to configure and install the
MutatingWebhookConfiguration manually. To generate a webhook configuration, you
can run poetry run c7n-kube --generate --endpoint $ENDPOINT_URL --policy-dir $DIR, and
it will generate an appropriate configuration for you, based on your policies.
Note: some modification of the webhook configuration may be required. See the documentation on webhooks for more configuration.
Development
You can use skaffold to
assist with testing and debugging this controller. Run skaffold dev in this
folder to deploy the local container into a local kubernetes cluster. It will
automatically redeploy it as files change.
Metadata
Release files for c7n-kube 0.2.52
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| c7n_kube-0.2.52-py3-none-any.whl | Python 3 | none | any | Details |
Release files / c7n_kube-0.2.52-py3-none-any.whl
| Download URL | c7n_kube-0.2.52-py3-none-any.whl |
|---|---|
| Size | 28.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f96b1d974a24c88e2a4db6de6071c8b063d0b301e9486551ee4a05c5ef022172
|
|
BLAKE2b-256 checksum How to use checksums |
edc164c487f0d76346592b2f33efe263ac7c5b52d0a9b3566d3aae3db139fc19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Security for c7n-kube 0.2.52
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.