1

I am using this yaml file for deployment - https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-dbless.yaml

I'm wondering if I can install Kong with type NodePort? My enterprise cloud isn't allowing me to create resource of type LoadBalancer.

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
Sankalp
  • 1,182
  • 2
  • 17
  • 22

1 Answers1

1

Yes, you can do it, just change the service type to NodePort.

There is also thread discussion in Kong community : https://discuss.konghq.com/t/expose-kong-on-nodeport/8497

---
apiVersion: v1
kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
  name: kong-proxy
  namespace: kong
spec:
  ports:
  - name: proxy
    port: 80
    protocol: TCP
    targetPort: 8000
  - name: proxy-ssl
    port: 443
    protocol: TCP
    targetPort: 8443
  selector:
    app: ingress-kong
  type: NodePort
---

You might need to take care of POD scheduling on the same node each time, with NodeSelector or affinity if using NodeIP as DNS somewhere in routing or so.

You can also check document of KIC in this doc : https://kind.sigs.k8s.io/docs/user/ingress/

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102