0
0
Kubernetesdevops~20 mins

Why Ingress manages external access in Kubernetes - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Ingress Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary role of an Ingress in Kubernetes?

In Kubernetes, what main function does an Ingress resource serve?

AIt controls external access to services inside the cluster, often via HTTP/HTTPS routing.
BIt schedules pods onto nodes based on resource availability.
CIt stores persistent data for stateful applications.
DIt manages internal pod-to-pod communication within the cluster.
Attempts:
2 left
💡 Hint

Think about how users outside the cluster reach applications running inside.

💻 Command Output
intermediate
2:00remaining
Output of kubectl get ingress command

What output do you expect from kubectl get ingress if an Ingress resource named web-ingress is correctly configured?

Kubernetes
kubectl get ingress
A
NAME          CLASS    HOSTS             ADDRESS        PORTS   AGE
web-ingress   <none>   example.com       192.168.1.10   80      5m
B
NAME          READY   STATUS    RESTARTS   AGE
web-ingress   1/1     Running   0          5m
C
NAME          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
web-ingress   LoadBalancer 10.0.0.1        <pending>     80        5m
D
NAME          READY   UP-TO-DATE   AVAILABLE   AGE
web-ingress   3/3     3            3           5m
Attempts:
2 left
💡 Hint

Look for the output format that shows hosts, addresses, and ports related to Ingress.

Configuration
advanced
3:00remaining
Correct Ingress YAML for routing traffic

Which Ingress YAML snippet correctly routes HTTP traffic from myapp.example.com to a service named myapp-service on port 80?

A
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: myapp-ingress
spec:
  host: myapp.example.com
  backend:
    serviceName: myapp-service
    servicePort: 80
B
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: myapp-ingress
spec:
  rules:
  - host: myapp.example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: myapp-service
          servicePort: 80
C
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: myapp-ingress
spec:
  rules:
  - host: myapp.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: myapp-service
            port:
              number: 80
D
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: myapp-ingress
spec:
  rules:
  - host: myapp.example.com
    http:
      paths:
      - path: /
        pathType: ImplementationSpecific
        backend:
          service:
            name: myapp-service
            port:
              number: 8080
Attempts:
2 left
💡 Hint

Check the correct indentation and field names for Ingress backend service and port.

Troubleshoot
advanced
3:00remaining
Why is external traffic not reaching the service via Ingress?

You created an Ingress resource, but external HTTP requests to your domain are not reaching the service. Which is the most likely cause?

AThe service has no selector labels matching any pods.
BThe Ingress controller is not installed or running in the cluster.
CThe pod containers are missing readiness probes.
DThe cluster nodes do not have enough CPU resources.
Attempts:
2 left
💡 Hint

Ingress resources need a controller to act on them and route traffic.

Best Practice
expert
3:00remaining
Best practice for securing Ingress external access

Which practice best secures external access managed by an Ingress in Kubernetes?

AUse only HTTP protocol to reduce overhead and improve speed.
BExpose all services directly with NodePort to avoid Ingress complexity.
CDisable authentication on Ingress to simplify user access.
DUse TLS encryption with certificates and enforce HTTPS traffic in the Ingress rules.
Attempts:
2 left
💡 Hint

Think about protecting data in transit and user privacy.