Skip to main content

k8s

Supported Platform

  • kubernetes

Description

Kubernetes Cluster

Fields

IDTYPEDESCRIPTION
apiResources[]k8s.apiresourceAvailable Resource Types
nodes[]k8s.nodeCluster Nodes
namespaces[]k8s.namespaceCluster Namespaces
pods[]k8s.podCluster Pods
deployments[]k8s.deploymentCluster Deployments
daemonsets[]k8s.daemonsetCluster DaemonSets
jobs[]k8s.jobCluster Jobs
cronjobs[]k8s.cronjobCluster CronJobs
secrets[]k8s.secretCluster Secrets
serverVersiondictCluster Version
podSecurityPolicies[]k8s.podsecuritypolicyKubernetes PodSecurityPolicy's
configmaps[]k8s.configmapConfig Maps
services[]k8s.serviceKubernetes Services
networkPolicies[]k8s.networkpolicyKubernetes Network Polices
serviceaccounts[]k8s.serviceaccountKubernetes Service Accounts
clusterroles[]k8s.rbac.clusterroleKubernetes RBAC Cluster Roles
roles[]k8s.rbac.roleKubernetes RBAC Roles
clusterrolebindings[]k8s.rbac.clusterrolebindingKubernetes RBAC Cluster Role Bindings
rolebindings[]k8s.rbac.rolebindingKubernetes RBAC Role Bindings

Examples

List kubernetes pods with privileged containers

k8s.pods { containers.where(securityContext["privileged"] == true) name }

Check if the default namespace is used

k8s.pods.all(namespace != "default");

Query services accounts

k8s.serviceaccounts { name namespace secrets  }

Query RBAC cluster roles

k8s.roles { name namespace rules  }

Query RBAC role bindings

k8s.rolebindings { name namespace subjects  }

Query RBAC cluster role bindings

k8s.clusterrolebindings { name subjects  }

Query pod security policies

k8s.podSecurityPolicies { name manifest }

Query network policies

k8s.networkPolicies { name manifest }