Skip to main content

About the Chef InSpec Kubernetes resource pack

Chef InSpec Kubernetes resources allow you to audit and validate the configuration, security, and compliance of your Kubernetes clusters.

Requirements

Usage

To create and run a profile against a Kubernetes cluster, follow these steps:

  1. Ensure your KUBECONFIG environment variable or ~/.kube/config file has a valid configuration and credentials for the target cluster.

  2. Define the platform and this resource pack as a dependency in your profile’s inspec.yml file:

    supports:
      platform: k8s
    depends:
      - name: inspec-k8s
        url: https://github.com/inspec/inspec-k8s/archive/main.tar.gz
    
  3. Define controls using the resources listed below.

  4. Execute the profile against your cluster:

    inspec exec profile -t k8s://
    

Example

For an example profile, see the inspec-k8s-sample example repository.

Kubernetes resources

The following Chef InSpec Kubernetes resources are available in this resource pack.

Thank you for your feedback!

×