C Migrating from Traefik Ingress Controller to Annotations Based Generic Ingress Controller

Prerequisites

Here are the prerequisites you need:

  • Install annotation-based ingress controller.
  • Delete Traefik Ingress Controller. For more information, see Setting Up Automation

Installing Generic Ingress Controller

To install generic ingress controller:

  1. You can use any annotation-based ingress controller that supports standard Kubernetes ingress API. The samples for NGINX ingressController are provided.
  2. For installation of NGINX, the sample values are provided under $COMMON_CNTK/samples/charts/nginx. For more information, see Working with Ingress, Ingress Controller, and External Load Balancer

Migrating to Generic Ingress Controller for ATA

To migrate to generic ingress controller for ATA:

  1. Delete Traefik Ingress Controller. For more information, see Setting Up Automation.
  2. Download the latest common-cntk, copy the latest applications.yaml file to spec path and retain your old, required values.
  3. Make sure the value of ingressController in spec path is GENERIC.
    ingressController: "GENERIC"
  4. Update the loadbalancerport value in applications.yaml with your ingressController loadbalancer or NodePort port.
  5. Uncomment and provide required ingress annotations and ingressClassName in applications.yaml file according to your ingress controller. The samples are provided for NGINX ingress controller.
    ingress:
      className: "nginx"
      annotations:
        nginx.ingress.kubernetes.io/affinity: "cookie"
        nginx.ingress.kubernetes.io/affinity-mode: "persistent"
        nginx.ingress.kubernetes.io/session-cookie-name: "nginxingresscookie"
        nginx.ingress.kubernetes.io/proxy-body-size: "50m"
        nginx.ingress.kubernetes.io/proxy-buffer-size: 64k
  6. (Optional) Provide additional annotations under ata.ingress.annotations tag that is specific to ATA.
  7. Upgrade the ATA instance.
    $COMMON_CNTK/scripts/upgrade-instance.sh -p project -i instance -f $SPEC_PATH/project/instance/applications.yaml -a ata
  8. Verify if your application is accessible through your ingressController port.

Migrating to Generic Ingress Controller for Message Bus

To migrate to generic ingress controller for Message Bus:

  1. Download the latest common-cntk, copy the latest applications.yaml file to spec path and retain your old, required values.
  2. Make sure the value of ingressController in spec path is GENERIC.
    ingressController: "GENERIC"
  3. If TLS is True, update the loadbalancerport value in applications.yaml with your ingressController loadbalancer or NodePort port.
  4. If TLS is False, update ingressSslPort inside the kafka-cluster section in applications.yaml with ingressController loadbalancer or NodePort port.
    ingress:
      className: "nginx"
      annotations:
        nginx.ingress.kubernetes.io/affinity: "cookie"
        nginx.ingress.kubernetes.io/affinity-mode: "persistent"
        nginx.ingress.kubernetes.io/session-cookie-name: "nginxingresscookie"
        nginx.ingress.kubernetes.io/proxy-body-size: "50m"
        nginx.ingress.kubernetes.io/proxy-buffer-size: 64k
  5. Uncomment and provide required ingress annotations specific to Kafka cluster and ingressClassName in applications.yaml file according to your ingress Controller. The samples are provided for NGINX ingress controller.
  6. For Message Bus, annotations given in kafka-cluster section are mandatory, under kafka-cluster.listeners.ingress.annotations tag.
    kafka-cluster:
      listeners:
        ingress:
          ingressSslPort:
          annotations:
            nginx.ingress.kubernetes.io/ingress.allow-http: "false"
            nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
            ingress.kubernetes.io/ssl-passthrough: "true"
            nginx.ingress.kubernetes.io/ssl-passthrough: "true"
  7. Upgrade the Message Bus instance.
    $COMMON_CNTK/scripts/upgrade-application.sh -p project -i instance -f $SPEC_PATH/project/instance/applications.yaml -a messaging-bus
  8. Verify your application is accessible through your ingressController port.

Migrating to Generic Ingress Controller for OAM

To migrate to generic ingress controller for OAM:

  1. Download the latest common-cntk, copy the latest applications.yaml file to spec path and retain your old, required values.
  2. Make sure the value of ingressController in spec path is GENERIC.
    ingressController: "GENERIC"
  3. Update the loadbalancerport value in applications.yaml with your ingressController loadbalancer or NodePort port.
  4. Uncomment and provide the required ingress annotations and ingressClassName in applications.yaml file according to your ingress controller, samples are provided for NGINX ingress controller.
    ingress:
      className: "nginx"
      annotations:
        nginx.ingress.kubernetes.io/affinity: "cookie"
        nginx.ingress.kubernetes.io/affinity-mode: "persistent"
        nginx.ingress.kubernetes.io/session-cookie-name: "nginxingresscookie"
        nginx.ingress.kubernetes.io/proxy-body-size: "50m"
        nginx.ingress.kubernetes.io/proxy-buffer-size: 64k
  5. If SSL enabled, provide additional annotations under oam-server.ingress.annotations tag.
    oam-server:
      ingress:
        annotations:
          nginx.ingress.kubernetes.io/configuration-snippet: |
            more_clear_input_headers "WL-Proxy-Client-IP" "WL-Proxy-SSL" "X-Custom-Request-Header" ;
            more_set_input_headers "X-Forwarded-Proto: https";
            more_set_input_headers "WL-Proxy-SSL: true";
            more_set_input_headers "IS_SSL: ssl";
  6. Upgrade the OAM instance.
    $COMMON_CNTK/scripts/upgrade-instance.sh -p project -i instance -f $SPEC_PATH/project/instance/applications.yaml -a oam
  7. Verify your application is accessible through your ingressController port.