TIS1504 - Gateway API Class Not Found in Configuration
The specified Gateway API Class
is not found in the cluster configuration.
gatewayClassName
References a Valid GatewayClass
To make sure your Gateway
functions properly, update the gatewayClassName
to reference a valid GatewayClass
that has been configured in the cluster.
Examples
-
Gateway
with Non-ExistentgatewayClassName
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: my-gateway
namespace: example-namespace
spec:
gatewayClassName: "non-existent-class"
listeners:
- name: http
port: 80
protocol: HTTPExplanation: The
gatewayClassName
field in theGateway
resource referencesnon-existent-class
, but there is no correspondingGatewayClass
configured in the cluster. This results in theGateway
being unusable since it cannot be linked to a valid class for managing network traffic.
Recommendation
Change the gatewayClassName
field to reference an existing configured GatewayClass
.
-
Update
gatewayClassName
to Reference an Existing GatewayClassUpdate the
gatewayClassName
to point to a validGatewayClass
that has been configured in the cluster.apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: my-gateway
namespace: example-namespace
spec:
gatewayClassName: "existing-class"
listeners:
- name: http
port: 80
protocol: HTTPExplanation: By changing the
gatewayClassName
to referenceexisting-class
, which is a validGatewayClass
, theGateway
resource can be properly utilized to route traffic according to the intended configuration. -
Verify the Availability of the
GatewayClass
Ensure the
GatewayClass
being referenced is available in the cluster. You can create or check existingGatewayClass
definitions as needed.apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GatewayClass
metadata:
name: existing-class
spec:
controllerName: "example.gateway.controller"Explanation: Ensuring that the
GatewayClass
exists in the cluster allows theGateway
to use it effectively for network traffic management.