Kubernetes icon

Kubernetes

Interact with Kubernetes

Namespaces → Logs

AI-generated

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically for the 'Namespaces' resource with the 'Logs' operation, it retrieves logs from a specified container within a pod in a given namespace. This is useful for monitoring and debugging applications running in Kubernetes by accessing their runtime logs.

Use Case Examples

  1. Fetching logs from a specific container in a pod within a namespace to troubleshoot application issues.
  2. Monitoring real-time logs of a container to analyze application behavior during deployment or testing.

Properties

Name Meaning
Namespace The Kubernetes namespace where the target resource (pod) resides.
Resource Name The name of the specific resource (pod) from which to retrieve logs.
Container Name The name of the container within the pod to fetch logs from. Defaults to 'main-container'.

Output

JSON

  • logs - The logs output from the specified container in the pod.

Dependencies

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

Troubleshooting

  • Error 'Resource name is required for logs operation!' indicates that the resource name (pod name) was not provided; ensure this parameter is set.
  • If logs are empty or missing, verify the container name is correct and the pod is running.
  • Authentication errors suggest issues with Kubernetes credentials; verify the API key or token is valid and has necessary permissions.

Links

Discussion