Get started with Kubernetes Connector

  • Latest Dynatrace
  • How-to guide
  • 1-min read
  • Published May 06, 2024

Learn how to list Kubernetes pods with Kubernetes Connector Kubernetes connector. You will create a workflow using a single Kubernetes Connector action and then run it.

Prerequisites

  • Have a basic knowledge of Dynatrace Workflows. For more information, see Workflows quick start.

  • Familiarize yourself with Kubernetes Connector.

  • Verify that you have Set up Kubernetes Connector.

  • Verify that the Service Account used by EdgeConnect is allowed to list Kubernetes pods in your namespace. Check this with

    kubectl auth can-i list pods --as=system:serviceaccount:dynatrace:<serviceaccountname> -n <namespace>
  • Verify that you have all the permissions needed to run Kubernetes tasks.

Steps

Create a workflow to list Kubernetes Pods with a single List resources action.

  1. Go to Workflows Workflows and select Add Workflow.

  2. In the Select a trigger panel, select one of the available triggers.

  3. On the trigger node, select Add Add task to browse available actions.

  4. In the Choose action panel, either search for kubernetes or scroll to the Kubernetes Connector section.

    Find Kubernetes Connector actions

  5. Select the List resources action.

  6. Select a Connection.

    Select Kubernetes connection.

  7. Enter the Namespace you want to list the resources from.

    Select Kubernetes namespace.

  8. Choose a Resource type.

    Select Kubernetes resource type.

  9. Select pods to list the pods for this Namespace.

  10. optional Enter the Field selector.

  11. optional Enter the Label selector.

  12. Select Run.

  13. Select the Result tab of the executed List resources action and check what pods are running in your namespace.

Related tags
Software Delivery