Skip to main content

k8s_pods resource

Use the k8s_pods Chef InSpec audit resource to test the configurations of all Pods in a namespace.

Installation

Syntax

describe k8s_pods do
  #...
end

Parameter

namespace
Namespace of the resource.

Properties

uid
UID of the Pod.
name
Name of the Pod.
namespace
Namespace of the Pod.
resource_version
Resource version of the Pod.
kind
Resource type of the Pod.
metadata
Metadata for the Pod.

Examples

Pods for default namespace must exist

 describe k8s_pods do
  it { should exist }
end

Pods for specified namespace must exist

describe k8s_pods(namespace: 'kube-system') do
  it { should exist }
end

Matchers

For a full list of available matchers, see our Universal Matchers page.
Edit this page on GitHub

Thank you for your feedback!

×









Search Results