helm_charthelm_releasehelm_templatehelm_template_renderedhelm_valuekubernetes_cluster_rolekubernetes_cluster_role_bindingkubernetes_config_mapkubernetes_cronjobkubernetes_custom_resource_definitionkubernetes_daemonsetkubernetes_deploymentkubernetes_endpointkubernetes_endpoint_slicekubernetes_eventkubernetes_horizontal_pod_autoscalerkubernetes_ingresskubernetes_jobkubernetes_limit_rangekubernetes_namespacekubernetes_network_policykubernetes_nodekubernetes_persistent_volumekubernetes_persistent_volume_claimkubernetes_podkubernetes_pod_disruption_budgetkubernetes_pod_security_policykubernetes_pod_templatekubernetes_replicasetkubernetes_replication_controllerkubernetes_resource_quotakubernetes_rolekubernetes_role_bindingkubernetes_secretkubernetes_servicekubernetes_service_accountkubernetes_stateful_setkubernetes_storage_classkubernetes_{custom_resource_singular_name}
Table: kubernetes_deployment
A Deployment provides declarative updates for Pods and ReplicaSets.
You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.
Examples
Basic Info
select name, namespace, status_replicas, ready_replicas, updated_replicas, available_replicas, unavailable_replicas, age(current_timestamp, creation_timestamp)from kubernetes_deploymentorder by namespace, name;
Configuration Info
select name, paused, generate_name, generation, revision_history_limit, replicas, strategy, selectorfrom kubernetes_deployment;
Container Images used in Deployments
select name as deployment_name, namespace, c ->> 'name' as container_name, c ->> 'image' as imagefrom kubernetes_deployment, jsonb_array_elements(template -> 'spec' -> 'containers') as corder by namespace, name;
List pods for a deployment
select pod.namespace, d.name as deployment_name, rs.name as replicaset_name, pod.name as pod_name, pod.phase, age(current_timestamp, pod.creation_timestamp), pod.pod_ip, pod.node_namefrom kubernetes_pod as pod, jsonb_array_elements(pod.owner_references) as pod_owner, kubernetes_replicaset as rs, jsonb_array_elements(rs.owner_references) as rs_owner, kubernetes_deployment as dwhere pod_owner ->> 'kind' = 'ReplicaSet' and rs.uid = pod_owner ->> 'uid' and rs_owner ->> 'uid' = d.uid and d.name = 'frontend'order by pod.namespace, d.name, rs.name, pod.name;
List Pods with access to the to the host process ID, IPC, or network namespace
select namespace, name, template -> 'spec' ->> 'hostPID' as hostPID, template -> 'spec' ->> 'hostIPC' as hostIPC, template -> 'spec' ->> 'hostNetwork' as hostNetworkfrom kubernetes_deploymentwhere template -> 'spec' ->> 'hostPID' = 'true' or template -> 'spec' ->> 'hostIPC' = 'true' or template -> 'spec' ->> 'hostNetwork' = 'true';
List manifest resources
select name, namespace, replicas, pathfrom kubernetes_deploymentwhere path is not nullorder by namespace, name;
Query examples
- cluster_deployments_count
- deployment_1_year_count
- deployment_24_hours_count
- deployment_30_90_days_count
- deployment_30_days_count
- deployment_90_365_days_count
- deployment_age_table
- deployment_annotations
- deployment_by_context
- deployment_by_context_name
- deployment_by_creation_month
- deployment_by_namespace
- deployment_container_host_ipc
- deployment_container_host_ipc_count
- deployment_container_host_network
- deployment_container_host_network_count
- deployment_container_host_pid
- deployment_container_host_pid_count
- deployment_count
- deployment_default_namespace
- deployment_default_namespace_count
- deployment_host_table
- deployment_input
- deployment_labels
- deployment_overview
- deployment_replica
- deployment_replica_count
- deployment_replicas_detail
- deployment_replicas_table
- deployment_strategy
- deployment_tree
- deployments_for_namespace
- namespace_deployment_count
- namespace_deployment_table
.inspect kubernetes_deployment
Kubernetes Deployment enables declarative updates for Pods and ReplicaSets.
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
annotations | jsonb | Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. |
available_replicas | bigint | Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. |
collision_count | bigint | Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. |
conditions | jsonb | Represents the latest available observations of a deployment's current state. |
context_name | text | Kubectl config context name. |
creation_timestamp | timestamp with time zone | CreationTimestamp is a timestamp representing the server time when this object was created. |
deletion_grace_period_seconds | bigint | Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. |
deletion_timestamp | timestamp with time zone | DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. |
end_line | bigint | The path to the manifest file. |
finalizers | jsonb | Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. |
generate_name | text | GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. |
generation | bigint | A sequence number representing a specific generation of the desired state. |
labels | jsonb | Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. |
min_ready_seconds | bigint | Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0. |
name | text | Name of the object. Name must be unique within a namespace. |
namespace | text | Namespace defines the space within which each name must be unique. |
observed_generation | bigint | The generation observed by the deployment controller. |
owner_references | jsonb | List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. |
path | text | The path to the manifest file. |
paused | boolean | Indicates that the deployment is paused. |
progress_deadline_seconds | bigint | The maximum time in seconds for a deployment to make progress before it is considered to be failed. |
ready_replicas | bigint | Total number of ready pods targeted by this deployment. |
replicas | bigint | Number of desired pods. Defaults to 1. |
resource_version | text | An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. |
revision_history_limit | bigint | The number of old ReplicaSets to retain to allow rollback. |
selector | jsonb | Label selector for pods. A label selector is a label query over a set of resources. |
selector_query | text | A query string representation of the selector. |
source_type | text | The source of the resource. Possible values are: deployed and manifest. If the resource is fetched from the spec file the value will be manifest. |
start_line | bigint | The path to the manifest file. |
status_replicas | bigint | Total number of non-terminated pods targeted by this deployment (their labels match the selector). |
strategy | jsonb | The deployment strategy to use to replace existing pods with new ones. |
tags | jsonb | A map of tags for the resource. This includes both labels and annotations. |
template | jsonb | Template describes the pods that will be created. |
title | text | Title of the resource. |
uid | text | UID is the unique in time and space value for this object. |
unavailable_replicas | bigint | Total number of unavailable pods targeted by this deployment. |
updated_replicas | bigint | Total number of non-terminated pods targeted by this deployment that have the desired template spec. |