Skip to main content

Cloud Custodian - Kubernetes Provider

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

c7n_kube-0.2.49-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file c7n_kube-0.2.49-py3-none-any.whl.

File metadata

  • Download URL: c7n_kube-0.2.49-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for c7n_kube-0.2.49-py3-none-any.whl
Algorithm Hash digest
SHA256 ff243106317500ff4502c99b51f296ae01c084b9d0e52c2f9c6d38acadc36d33
MD5 a07f1c72a69b6630944a3a71ab44b36b
BLAKE2b-256 dd69877f0f6814bedd0f4641b9d0f79bc6cb7e6ec6b388f26161156638fc5297

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page