k8s_pod resource
Use the k8s_pod Chef InSpec audit resource to test the configuration of a specific Pod in the specified namespace.
Syntax
describe k8s_pod(namespace: "NAMESPACE", name: "NAME") 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
Pod for default namespace must exist:
describe k8s_pod(name: 'NAME') do
it { should exist }
end
Pod for a specified namespace must exist:
describe k8s_pod(namespace: 'NAMESPACE', name: 'NAME') do
it { should exist }
end