Authentication

This provider requires authentication.

  • api_server: The kubernetes api server url (required: True, sensitive: False)
  • token: Bearer token to access kubernetes (required: True, sensitive: True)
  • insecure: Skip TLS verification (required: False, sensitive: False)

In workflows

This provider can be used in workflows.

As “step” to query data, example:

steps:
    - name: Query kubernetes
      provider: kubernetes
      config: "{{ provider.my_provider_name }}"
      with:
        command_type: {value}  # The type of query to perform. Supported queries are get_logs, get_events, get_pods, get_node_pressure, and get_pvc.
        # Additional arguments for the query.

As “action” to make changes or update data, example:

actions:
    - name: Query kubernetes
      provider: kubernetes
      config: "{{ provider.my_provider_name }}"
      with:
        action: {value}  # The action to perform. Supported actions are rollout_restart and restart_pod.
        # Additional arguments for the action.

Check the following workflow example:

Connecting with the Provider

To connect to Kubernetes, follow below steps:

  1. Create a service account on Kubernetes.
  2. Create role/clusterrole and bind to service account using rolebinding/clusterrolebinding.
  3. Get the token of service account.

Notes

  • This provider allows you to interact with Kubernetes to perform rollout restart or pods listing actions.