Skip to content
CKAServices & NetworkingTwo nodesMedium

Ingress routing to a Service

Scenario cka-net-004 · about 8 minutes · 7 points · 4 grader checks

Create an Ingress that routes a hostname and path prefix to an existing Service through the nginx IngressClass.

  • ingress
  • ingressclass
  • nginx
  • networking

What you will practise

  • Create an Ingress resource with ingressClassName
  • Define host and path-based rules
  • Route to a backend Service port

Start this lab

With the CLI installed and signed in, this command provisions a two nodes cluster on your Mac, applies the scenario setup and prints the task below.

goldenkube start cka-net-004

Task

The task text exactly as the CLI shows it. Solve it on the cluster, then run goldenkube submit.

In namespace "web" a Deployment "site" and a ClusterIP Service "site-svc" (port 80) already exist. The ingress-nginx controller is installed (IngressClass "nginx"). Create an Ingress named "site-ing" in namespace "web" with ingressClassName "nginx" that routes host "site.example.com", path "/" (pathType Prefix) to Service "site-svc" port 80.

Requirements and details

Certification
CKA · Certified Kubernetes Administrator
Domain
Services & Networking
Difficulty
Medium
Cluster topology
Two nodes
Cluster features
Ingress
Recommended time
8 minutes
Points
7
Grader checks
4
Kubernetes version
1.37
Minimum CLI version
0.1.0
Scenario version
1
Published

Grading runs locally: 4 state checks read your cluster when you submit; the scenario passes when every check passes. Hints, the reference solution and the check definitions are available only inside the CLI, not on this page.

CKAServices & NetworkingEasy

ClusterIP Service for a Deployment

Expose an existing Deployment inside the cluster with a ClusterIP Service that selects all its pods.

Two nodes · ~6 min · 5 points

  • service
  • clusterip
  • endpoints
  • networking

goldenkube start cka-net-001

CKAServices & NetworkingEasy

NodePort Service with a fixed port

Expose a Deployment outside the cluster with a NodePort Service on a specific node port.

Two nodes · ~6 min · 5 points

  • service
  • nodeport
  • networking

goldenkube start cka-net-002

CKAServices & NetworkingMedium

NetworkPolicy: allow ingress from one app only

Restrict ingress to database pods so only client pods may reach them on a single TCP port.

Two nodes · ~9 min · 7 points

  • networkpolicy
  • ingress
  • cilium
  • networking
  • security

goldenkube start cka-net-003

CKAServices & NetworkingMedium

Gateway API HTTPRoute

Attach an HTTPRoute to an existing Gateway so a path prefix is routed to a Service.

Two nodes · ~9 min · 7 points · Gateway API

  • gateway-api
  • httproute
  • gateway
  • networking

goldenkube start cka-net-005

Independent community project, not affiliated with or endorsed by CNCF or The Linux Foundation. Lab results are practice feedback, not an exam score.