Vote Lab: CKA Mock Exam 5 (ingress resource nginx-ingress-cka04-svcn)

Solve this question on: ssh cluster3-controlplane

There is a deployment nginx-deployment-cka04-svcn in cluster3 which is exposed using service nginx-service-cka04-svcn.

Create an ingress resource nginx-ingress-cka04-svcn to load balance the incoming traffic with the following specifications:

pathType: Prefix and path: /
Backend Service Name: nginx-service-cka04-svcn
Backend Service Port: 80
ssl-redirect is set to false

**my solution**

cluster3-controlplane ~ ➜ k get ingressclasses.networking.k8s.io -A

NAME CONTROLLER PARAMETERS AGE
traefik traefik.io/ingress-controller 3h20m

cluster3-controlplane ~ ➜ cat nginx-ingress-cka04-svcn.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-ingress-cka04-svcn
annotations:
traefik.ingress.kubernetes.io/ssl-redirect: “false”
spec:
ingressClassName: traefik
rules:

  • http:
    paths:
    • path: /
      pathType: Prefix
      backend:
      service:
      name: nginx-service-cka04-svcn
      port:
      number: 80

cluster3-controlplane ~ ➜

my solution is marked wrong even 


cluster3-controlplane ~ ➜ k get ingress 
NAME CLASS HOSTS ADDRESS PORTS AGE 
nginx-ingress-cka04-svcn traefik * 10.244.116.188 80 83m 

cluster3-controlplane ~ ➜ curl 10.244.116.188 
<html> 
<head><title>Hello World!</title> 
<style> html { font-size: 500.0%; } div { text-align: center; } </style> 
</head> 
<body> 
<div>Hello World!</div> 
</body>
 </html> 

cluster3-controlplane ~ ➜

why ?? there is already an traefic ingress controller given.

Please use code blocks (see these instructions as to how to do this) since your code is garbled!

This problem is a little weird – they’re asking for an ingress-nginx annotation (traeffik does not use these kinds of annotations), but it’s a traefik based resource, and traefik handles the resource successfully.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{"nginx.ingress.kubernetes.io/ssl-redirect":"false"},"name":"nginx-ingress-cka04-svcn","namespace":"default"},"spec":{"rules":[{"http":{"paths":[{"backend":{"service":{"name":"nginx-service-cka04-svcn","port":{"number":80}}},"path":"/","pathType":"Prefix"}]}}]}}
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
  creationTimestamp: "2026-03-22T14:50:30Z"
  generation: 1
  name: nginx-ingress-cka04-svcn
  namespace: default
  resourceVersion: "3009"
  uid: 07191355-be2d-4807-99f3-dffa1465d951
spec:
  ingressClassName: traefik
  rules:
  - http:
      paths:
      - backend:
          service:
            name: nginx-service-cka04-svcn
            port:
              number: 80
        path: /
        pathType: Prefix
status:
  loadBalancer:
    ingress:
    - ip: 10.244.116.134

The grader expects an ingress-nginx annotation, which traefik of course ignores.