Good day,
Please I need help on why I was marked wrong on this question:
Solve this question on: ssh cluster1-controlplane
Modify the existing web-gateway on cka5673 namespace to handle HTTPS
traffic on port 443 for kodekloud.com, using a TLS certificate stored in a
secret named kodekloud-tls.
I have tried to compare the provided yaml with mine and at the moment, I cannot tell that there are any tangible differences. I would greatly appreciate any assistance I can get here.
The provided solution at the end of the exam:
# web-gateway.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: web-gateway
namespace: cka5673
spec:
gatewayClassName: kodekloud
listeners:
- name: https
protocol: HTTPS
port: 443
hostname: kodekloud.com
tls:
certificateRefs:
- name: kodekloud-tls
This is my yaml manifest from my work (which was marked wrong) below. I would really appreciate any help in figuring out exactly what tangible difference caused me to be marked wrong:
cluster1-controlplane ~ âžś k get gateway -n cka5673 web-gateway -o yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"gateway.networking.k8s.io/v1","kind":"Gateway","metadata":{"annotations":{},"name":"web-gateway","namespace":"cka5673"},"spec":{"gatewayClassName":"kodekloud","listeners":[{"name":"https","port":80,"protocol":"HTTP"}]}}
creationTimestamp: "2025-04-29T19:17:47Z"
generation: 2
name: web-gateway
namespace: cka5673
resourceVersion: "9683"
uid: cadda2b5-218c-4a13-b0ff-4b5c4ec0f7d3
spec:
gatewayClassName: kodekloud
listeners:
- allowedRoutes:
namespaces:
from: Same
name: https
port: 443
protocol: HTTPS
tls:
certificateRefs:
- group: ""
kind: secret
name: kodekloud-tls
namespace: cka5673
mode: Terminate
status:
conditions:
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: Waiting for controller
reason: Pending
status: Unknown
type: Accepted
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: Waiting for controller
reason: Pending
status: Unknown
type: Programmed
cluster1-controlplane ~ âžś