hi.
I have a question while using api-gateway, which is a new service mesh function of consul, so I leave it.
My services environment is Kubernetes and my consul server is VM.
My config files are:
#gateway.yaml
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
name: my-api-gateway
namespace: consul
spec:
gatewayClassName: consul-api-gateway
listeners:
- protocol: HTTP
port: 80
name: http
- protocol: HTTPS
port: 8443
name: https
allowedRoutes:
namespaces:
from: Same
tls:
certificateRefs:
- name: api-crt
#httproute.yaml
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: fake-route
namespace: default
spec:
parentRefs:
- name: my-api-gateway
namespace: consul
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- kind: Service
name: web
namespace: default
port: 9090
And below is the result of checking the resources with describe.
#describe gateway
Name: http
Supported Kinds:
Group: gateway.networking.k8s.io
Kind: HTTPRoute
Attached Routes: 0
#describe httproute
Status:
Parents:
Conditions:
Last Transition Time: 2022-11-01T10:58:54Z
Message: Route accepted.
Observed Generation: 1
Reason: Accepted
Status: True
Type: Accepted
Last Transition Time: 2022-11-01T10:58:54Z
Message: ResolvedRefs
Observed Generation: 1
Reason: ResolvedRefs
Status: True
Type: ResolvedRefs
Controller Name: hashicorp.com/consul-api-gateway-controller
Parent Ref:
Group: gateway.networking.k8s.io
Kind: Gateway
Name: my-api-gateway
Namespace: consul
Currently, it seems that httproute is normally distributed as above, but it seems that httproute does not refer to the gateway.
(I judged this to be “0” in the value of “Attached Routes” to the gateway.)
In other kubernetes clusters, the configuration was completed with the same YAML file.
Is there something I might have missed?
I’d appreciate it if you could post anything.