top of page
Search

CKA EXAM QS-2 2025

1- Create a new ingress resource as follows:


Name: echo

namespace: sound-repeater

Exposing Service schoserver-service on

http://example.org/echo using Service port 8080


The availability of service schoserver-service can be checked using the

following command which should return 200.


=========================================================

Answer: - again open https://kubernetes.io/docs/home/ website and search ingress rule. copy and paste the yaml file and edit the parameters



Vi echo-ingress.yaml


kind: Ingress

metadata:

name: echo

namespace: sound-repeater

annotations:

# Optional: tweak for particular ingress controllers (remove if unsure)

# For nginx ingress you might use: nginx.ingress.kubernetes.io/rewrite-target: /$1

spec:

rules:

- host: example.org

http:

paths:

- path: /echo

pathType: Prefix

backend:

service:

name: schoserver-service

port:

number: 8080


:wq


Kubetl apply -f echo-ingress.yaml


# kubectl get ingress -n sound-repeater


To verify

Above command will have o/p: 200

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page