Kubernetes icon

Kubernetes

Interact with Kubernetes

Jobs → Port Forward

AI-generated

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically, the 'Port Forward' operation allows users to forward one or more local ports to a pod in the Kubernetes cluster, enabling access to the pod's services locally. This is useful for debugging, testing, or accessing services running inside pods without exposing them externally. For example, a user can forward a local port to a database pod to run queries directly from their local machine.

Use Case Examples

  1. Forward a local port to a Kubernetes Job pod to access its service for debugging or monitoring.
  2. Use port forwarding to connect to a pod running a web server without exposing the service externally.

Properties

Name Meaning
Namespace The Kubernetes namespace where the Job resource is located. Defaults to 'default' if not specified.
Resource The Kubernetes resource type to operate on, in this case 'jobs'.
Resource Name The name of the specific Job resource to port forward to.

Output

JSON

  • json - The JSON output contains the result of the port forwarding operation, typically connection details or status.

Dependencies

  • Requires Kubernetes API credentials to authenticate and interact with the cluster.

Troubleshooting

  • Ensure Kubernetes credentials are correctly configured and valid; otherwise, the node will throw 'No credentials got returned!' error.
  • The 'Resource Name' parameter is mandatory for the port forward operation; missing it will cause an error.
  • Network or permission issues in the Kubernetes cluster may prevent successful port forwarding.

Links

Discussion