Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Delete Kubernetes Ingresses

AI-generated

Overview

This node operation allows you to delete Kubernetes Ingress resources by specifying their details. It is useful in scenarios where you need to programmatically remove ingress configurations from a Kubernetes cluster, such as cleaning up unused or outdated ingress rules, automating deployment rollbacks, or managing dynamic routing setups.

For example, if you have an ingress resource that routes traffic to a deprecated service, you can use this node to delete that ingress entry automatically as part of your CI/CD pipeline or infrastructure management workflow.

Properties

Name Meaning
Id The environment identifier representing the specific Kubernetes environment or cluster context where the ingress resource exists. This is a required numeric value.
Body The ingress details provided as a JSON string. This should contain the necessary information about the ingress resource you want to delete.

Output

The node outputs JSON data reflecting the result of the delete operation. Typically, this will include confirmation of deletion or any error messages returned by the Kubernetes API. There is no indication that binary data is output by this node.

Dependencies

  • Requires access to a Kubernetes cluster with appropriate permissions to delete ingress resources.
  • Needs an API authentication token or credentials configured in n8n to authenticate requests against the Kubernetes API.
  • The node uses HTTP requests to interact with the Kubernetes API endpoint.

Troubleshooting

  • Common issues:

    • Incorrect or missing environment identifier (Id) may cause the node to target the wrong cluster or fail to find the ingress resource.
    • Malformed or incomplete ingress details in the Body property can lead to API errors.
    • Insufficient permissions on the Kubernetes cluster to delete ingress resources will result in authorization errors.
    • Network connectivity issues between n8n and the Kubernetes API server can cause request failures.
  • Error messages:

    • Authorization errors typically indicate missing or invalid API credentials; ensure the API token has delete permissions for ingress resources.
    • Validation errors from the Kubernetes API usually mean the ingress details are incorrect or incomplete; verify the JSON structure matches expected Kubernetes ingress schema.
    • Timeout or connection errors suggest network problems; check connectivity and firewall settings.

Links and References

Discussion