Rather than setting spec.ingressClassName: kong in your Ingress definitions, you should now use either internal or external. Ingress definitions that target internal will only be available via Kong Gateway running in the internal namespace. Definitions that target external will only be available via the external gateway.
For Routes in Kubernetes Gateway APIs (like HTTPRoute), refer to the corresponding Gateway in its spec.parentRef.
For example, this is how you can create a Ingress or HTTPRoute for routing internal traffic:
echo "
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: echo-internal
namespace: internal
annotations:
konghq.com/strip-path: 'true'
spec:
parentRefs:
- name: kong
namespace: internal
rules:
- matches:
- path:
type: PathPrefix
value: '/echo'
backendRefs:
- name: echo
kind: Service
port: 1027
" | kubectl apply -f -
echo "
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: echo-internal
namespace: internal
annotations:
konghq.com/strip-path: 'true'
spec:
ingressClassName: internal
rules:
- http:
paths:
- path: '/echo'
pathType: ImplementationSpecific
backend:
service:
name: echo
port:
number: 1027
" | kubectl apply -f -