Kubernetes master minion ingress not working

6/22/2021

I was trying to configure a master-minion ingress in Kubernetes with nginx-ingress. Following is my configuration:

Master configuration:

kind: Ingress
apiVersion: networking.k8s.io/v1beta1
metadata:
  name: rexingress-master
  namespace: abc-onprem
  selfLink: >-
    /apis/networking.k8s.io/v1beta1/namespaces/abc-onprem/ingresses/rexingress-master
  uid: 648df5ac-a6e5-4234-806d-0cb85d1286a1
  resourceVersion: '6340106'
  generation: 2
  creationTimestamp: '2021-06-21T14:08:21Z'
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{"nginx.ingress.kubernetes.io/server-alias":"","nginx.org/mergeable-ingress-type":"master"},"name":"rexingress-master","namespace":"abc-onprem"},"spec":{"rules":[{"host":"abc-openshift-onprem.qa.sps.secops.xyz.com"}]}}
    nginx.org/mergeable-ingress-type: master
  managedFields:
    - manager: kubectl-client-side-apply
      operation: Update
      apiVersion: extensions/v1beta1
      time: '2021-06-21T14:08:21Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:kubectl.kubernetes.io/last-applied-configuration': {}
            'f:nginx.org/mergeable-ingress-type': {}
        'f:spec':
          'f:rules': {}
    - manager: Mozilla
      operation: Update
      apiVersion: networking.k8s.io/v1beta1
      time: '2021-06-21T14:18:26Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:spec':
          'f:tls': {}
spec:
  tls:
    - hosts:
        - abc-openshift-onprem.qa.sps.secops.xyz.com
      secretName: rexonprem-custom-certs
  rules:
    - host: abc-openshift-onprem.qa.sps.secops.xyz.com
status:
  loadBalancer: {}

Minion configuration:

kind: Ingress
apiVersion: networking.k8s.io/v1beta1
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    meta.helm.sh/release-name: rsso
    meta.helm.sh/release-namespace: abc-onprem
    nginx.ingress.kubernetes.io/proxy-buffer-size: 64k
    nginx.org/mergeable-ingress-type: minion
  selfLink: /apis/networking.k8s.io/v1beta1/namespaces/abc-onprem/ingresses/rsso
  resourceVersion: '6410156'
  name: rsso
  uid: d9c74156-cd00-4adb-a351-0baa841e356b
  creationTimestamp: '2021-06-21T14:12:04Z'
  generation: 6
  managedFields:
    - manager: Go-http-client
      operation: Update
      apiVersion: networking.k8s.io/v1beta1
      time: '2021-06-21T14:12:04Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:kubernetes.io/ingress.class': {}
            'f:meta.helm.sh/release-name': {}
            'f:meta.helm.sh/release-namespace': {}
            'f:nginx.ingress.kubernetes.io/proxy-buffer-size': {}
            'f:nginx.org/mergeable-ingress-type': {}
          'f:labels':
            .: {}
            'f:app': {}
            'f:app.kubernetes.io/managed-by': {}
            'f:chart': {}
            'f:product': {}
            'f:release': {}
        'f:spec':
          'f:rules': {}
    - manager: openshift-controller-manager
      operation: Update
      apiVersion: networking.k8s.io/v1beta1
      time: '2021-06-21T15:19:51Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:status':
          'f:loadBalancer':
            'f:ingress': {}
    - manager: Mozilla
      operation: Update
      apiVersion: networking.k8s.io/v1beta1
      time: '2021-06-21T16:54:05Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:spec':
          'f:tls': {}
  namespace: abc-onprem
  labels:
    app: rsso
    app.kubernetes.io/managed-by: Helm
    chart: rsso
    product: abc
    release: '1.0'
spec:
  rules:
    - host: abc-openshift-onprem.qa.sps.secops.xyz.com
      http:
        paths:
          - path: /rsso
            pathType: Prefix
            backend:
              serviceName: rsso
              servicePort: 8080
status:
  loadBalancer:
    ingress:
      - hostname: apps.rexabconprem.rb3m.p1.openshiftapps.com

However it appeared that master configuration is not taken into account, as tls was not working. On checking the logs, I found, the following error is coming:

Event(v1.ObjectReference{Kind:"Ingress", Namespace:"abc-onprem", Name:"rsso", UID:"d9c74156-cd00-4adb-a351-0baa841e356b", APIVersion:"networking.k8s.io/v1beta1", ResourceVersion:"6356031", FieldPath:""}): type: 'Warning' reason: 'NoIngressMasterFound' Ingress master is invalid or doesn't exist

I tried searching a lot, but could not find anything relevant. Can somebody please help me in fixing this issue?

-- slb
kubernetes
kubernetes-ingress

0 Answers