AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

KubernetesObjectValue

Represents a value of a specific object deployed in the cluster. Use this to fetch any information available by the `kubectl get` command.

Import

import { KubernetesObjectValue } from 'aws-cdk-lib/aws-eks';

Or use the module namespace:

import * as eks from 'aws-cdk-lib/aws-eks';
// eks.KubernetesObjectValue

Properties

Configuration passed to the constructor as KubernetesObjectValueProps.

clusterRequired
ICluster

The EKS cluster to fetch attributes from. [disable-awslint:ref-via-interface]

jsonPathRequired
string

JSONPath to the specific value.

objectNameRequired
string

The name of the object to query.

objectTypeRequired
string

The object type to query. (e.g 'service', 'pod'...)

objectNamespaceOptional
string

The namespace the object belongs to.

Default: 'default'

removalPolicyOptional
RemovalPolicy

The removal policy applied to the custom resource that manages the Kubernetes object value. The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations: - The resource is removed from the template, so CloudFormation stops managing it - A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it - The stack is deleted, so CloudFormation stops managing all resources in it

Default: RemovalPolicy.DESTROY

timeoutOptional
Duration

Timeout for waiting on a value.

Default: Duration.minutes(5)

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter