I am using Kong Gateway on Kubernetes with the Kong Ingress Controller. However when I try to add a new route / ingress, I receive the following error:
The Ingress "{ingressName}" is invalid: spec.rules[0].host: Invalid value: "{hostName}": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')I’m using the following Ingress values in my deployment when I get the error above:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example
namespace: example-app
annotations:
konghq.com/protocols: https
konghq.com/https-redirect-status-code: '308'
konghq.com/strip-path: 'true'
konghq.com/preserve-host: 'false'
spec:
ingressClassName: kong
rules:
- host: hostname_api.example.com
paths:
- path: /examplePath
pathType: ImplementationSpecific
backend:
service:
name: example-svc
port:
number: 8080