Actions for Kubernetes Connector

  • Latest Dynatrace
  • Reference
  • 4-min read

The following workflow actions are available for Kubernetes Connector. All actions correspond to a command of the command-line interface kubectl.

Apply configurations

Apply a configuration change to a resource or create a new resource.

Command

kubectl apply

Inputs

FieldTypeDescriptionRequired

Kubernetes resources

string

YAML configuration that is applied. The namespace must be specified.

Required

Delete resources

Delete resources by YAML configuration, or by type and name.

Command

kubectl delete

Inputs

FieldTypeDescriptionRequired

Delete by

Enum

Choose delete by "Resource name" or by "YAML configuration".

Required

Kubernetes resources

string

YAML configuration that describes the resources to be deleted. The namespace must be specified.

Required

Resource type

Enum

Type of the resource.

Required

Resource name

string

Name of the resource.

Required

Namespace

string

The namespace scope.

Required

Forcefully delete resources

Boolean

Defaults to false. The resource may continue to run on the cluster indefinitely, if forcefully deleted.

Optional

Grace period

number

Period of time in seconds given to the resource to terminate gracefully. The grace period must be greater than 0.

Optional

Get logs

Get the logs for a container in a pod (limited to max. 6MB).

Command

kubectl logs

Inputs

FieldTypeDescriptionRequired

Namespace

string

The namespace scope.

Required

Pod

string

Pod to get the logs from.

Required

Container

string

The name of the container within the pod (only required if the pod has multiple containers).

Optional

Timeframe

number

Only return logs newer than a relative duration (in seconds) like 5 or 60. Defaults to all logs.

Optional

Get resource

Retrieve detailed information about a specific Kubernetes resource.

Command

kubectl get

Inputs

FieldTypeDescriptionRequired

Namespace

string

The namespace scope.

Required

Resource type

enum

Type of the resource.

Required

Name

string

Name of the resource.

Required

List resources

List resources of a specific type within a namespace, optionally filtered by labels or field values.

Command

kubectl get

Inputs

FieldTypeDescriptionRequired

Namespace

string

The namespace scope.

Required

Resource type

enum

Type of the resource.

Required

Field selector

string

A filter that retrieves resources by comparing their field values against specific conditions.

Optional

Label selector

string

Selector (label query) to filter on.

Optional

Patch resource

Update fields of a resource using a patch strategy.

Command

kubectl patch

Inputs

FieldTypeDescriptionRequired

Patch strategy

string

The patch strategy that is used to apply the Patch.

Required

Namespace

string

The namespace scope.

Required

Resource type

enum

Type of the resource.

Required

Name

string

The name of the resource.

Required

Patch

string

The patch to be applied to the resource formatted as JSON or YAML.

Required

Rollout restart resource

Restart a resource in a namespace.

Command

kubectl rollout restart

Inputs

FieldTypeDescriptionRequired

Resource type

enum

Type of the resource.

Required

Namespace

string

The namespace scope.

Required

Resource name

string

Name of the resource to restart.

Required

Restart deployment

Restart a deployment in a namespace.

This action is deprecated. Use the Rollout restart resource action instead.

Command

kubectl rollout restart

Inputs

FieldTypeDescriptionRequired

Namespace

string

The namespace scope.

Required

Deployment

string

Name of the deployment to restart.

Required

Wait

Waits for a condition on a specified resource.

Command

kubectl wait

Inputs

FieldTypeDescriptionRequired

Namespace

string

The namespace scope.

Required

Resource type

enum

Type of the resource.

Required

Name

string

Name of the resource.

Required

For

string

What to wait for. At the moment the value of this field is fixed to Condition.

Required

Type

string

Type of the condition to wait for (e.g. Ready).

Required

Status

string

The desired status of the condition (e.g. True).

Required

Related tags
Software Delivery