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 resourcesstringYAML 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 byEnumChoose delete by "Resource name" or by "YAML configuration".required
Kubernetes resourcesstringYAML configuration that describes the resources to be deleted. The namespace must be specified.required
Resource typeEnumType of the resource.required
Resource namestringName of the resource.required
NamespacestringThe namespace scope.required
Forcefully delete resourcesBooleanDefaults to false. The resource may continue to run on the cluster indefinitely, if forcefully deleted.optional
Grace periodnumberPeriod 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
NamespacestringThe namespace scope.required
PodstringPod to get the logs from.required
ContainerstringThe name of the container within the pod (only required if the pod has multiple containers).optional
TimeframenumberOnly 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
NamespacestringThe namespace scope.required
Resource typeenumType of the resource.required
NamestringName 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
NamespacestringThe namespace scope.required
Resource typeenumType of the resource.required
Field selectorstringA filter that retrieves resources by comparing their field values against specific conditions.optional
Label selectorstringSelector (label query) to filter on.optional

Patch resource

Update fields of a resource using a patch strategy.

Command

kubectl patch

Inputs

FieldTypeDescriptionRequired
Patch strategystringThe patch strategy that is used to apply the Patch.required
NamespacestringThe namespace scope.required
Resource typeenumType of the resource.required
NamestringThe name of the resource.required
PatchstringThe 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 typeenumType of the resource.required
NamespacestringThe namespace scope.required
Resource namestringName 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
NamespacestringThe namespace scope.required
DeploymentstringName of the deployment to restart.required

Wait

Waits for a condition on a specified resource.

Command

kubectl wait

Inputs

FieldTypeDescriptionRequired
NamespacestringThe namespace scope.required
Resource typeenumType of the resource.required
NamestringName of the resource.required
ForstringWhat to wait for. At the moment the value of this field is fixed to Condition.required
TypestringType of the condition to wait for (e.g. Ready).required
StatusstringThe desired status of the condition (e.g. True).required
Related tags
Software Delivery