kuberise / kuberise.io

Apache License 2.0
9 stars 13 forks source link

Internal and external ingress-nginx controller #65

Open mojtabaimani opened 2 days ago

mojtabaimani commented 2 days ago

Title: Integrate Internal and External ingress-nginx for Internal and External Services

Description:

To enhance the flexibility and security of Kuberise, we propose integrating both internal and external ingress-nginx controllers. This will allow us to manage internal services separately from external services, providing better control over traffic routing, security policies, and resource allocation.

Objectives:

  1. Deploy two instances of ingress-nginx controllers:
    • Internal ingress-nginx: Handles traffic for services that are only accessible within the cluster.
    • External ingress-nginx: Manages traffic for services that need to be exposed outside the cluster.
  2. Ensure that both ingress-nginx controllers can coexist without conflicts.
  3. Provide configurations and templates for easy setup and customization.
  4. Document the setup and usage guidelines for developers and platform engineers.

Tasks:

  1. Setup Helm charts:

    • Modify existing Helm charts or create new ones to support dual ingress-nginx deployment.
    • Include configuration options for internal and external ingress-nginx controllers.
  2. Configuration:

    • Define separate namespaces and resource quotas for internal and external ingress-nginx controllers.
    • Set up appropriate RBAC rules to restrict access and control over each ingress controller.
  3. Ingress Class Definitions:

    • Create distinct ingress classes for internal and external services.
    • Ensure that internal services are only routed through the internal ingress-nginx and vice versa.
  4. Annotations and Labels:

    • Implement necessary annotations and labels for services to specify which ingress controller should handle the traffic.
  5. Documentation:

    • Write comprehensive documentation detailing:
      • The purpose and benefits of using dual ingress-nginx controllers.
      • Step-by-step instructions for setting up and configuring both internal and external ingress-nginx.
      • Best practices for maintaining and troubleshooting the ingress controllers.
  6. Testing:

    • Perform thorough testing to ensure that both ingress controllers function as expected.
    • Validate that internal services are not accessible from outside the cluster.
    • Confirm that external services are correctly exposed and accessible.

Benefits:

mojtabaimani commented 2 days ago

Motivation

Using an internal ingress-nginx alongside an external ingress-nginx in a Kubernetes environment offers several benefits, even though services can be accessed directly via their service addresses and load balancing is already managed by Kubernetes. Here are some of the key benefits of using an internal ingress-nginx:

1. Security and Access Control

2. Consistent Access Management

3. Enhanced Load Balancing

4. Monitoring and Logging

5. Traffic Management

6. Simplified Configuration Management

7. Isolation of Environments

In summary, using an internal ingress-nginx provides enhanced security, consistent access management, advanced traffic control, and centralized monitoring and logging, all of which contribute to a more robust and manageable Kubernetes environment.