Good <suitable-time-of-the-day> to you all I am doing CKA/Mock Exam 1/que . . .

Alberto Melacini:
Good <suitable-time-of-the-day> to you all

I am doing CKA/Mock Exam 1/question 13:

Create a redis deployment using the image redis:alpine with 1 replica and label app=redis. Expose it via a ClusterIP service called redis on port 6379. Create a new Ingress Type NetworkPolicy called redis-access which allows only the pods with label access=redis to access the deployment

What is asked is very clear and also very very similar to this walk-through

In the article, the authors test their solution by creating a box and trying to connect to nginx via the service (called nginx)

kubectl run busybox --rm -ti --image=busybox:1.28 -- /bin/sh
wget --spider --timeout=1 nginx

My question is: what test can I perform in the case of question 13? In other words, what is the equivalent of the wget command to test the redis deployment?


ravi chechani:
this should help

Alberto Melacini:
Thanx! Nice redis walk-through.

Going back to my question, I guess that instead of having busybox for my test box I should have had redis and try use redis-cli as an equivalent to wget

I’ll try later…

ravi chechani:
yeah you still call redis on 6379 using service from redis-cli instead of wget

Alberto Melacini:
Just for the sake of the records:

k run redis-test --rm -ti --image=redis – /bin/sh

redis-cli -h redis

All good! :thumbsup: