Welcome to the Simplilearn Community

Want to join the rest of our members? Sign up right away!

Sign Up

Certified Kubernetes Administrator || Lakshmi Narayanan

Rajesh Kancherla

Customer
Customer
Hi Lakshmi Narayanan,

I was working on ClusterIP-deployment, ClusterIP-service and ClusterIP-targetport-deployment and Clusterip-targetport-service. I created deployment and service. However, when I try to run the curl command to the clusterip-service IP address I don't get a response. Ex:
root@ip-172-31-4-135:~/service# kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
clusterip-deployement 3/3 3 3 37m
clusterip-taget-deployement 3/3 3 3 8s

root@ip-172-31-4-135:~/service# kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
clusterip-service ClusterIP 10.101.155.253 <none> 80/TCP 37m
clusterip-targetport-service ClusterIP 10.99.176.73 <none> 8080/TCP 5s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 2d7h

I am on master node now:

root@ip-172-31-4-135:~/service# curl 10.99.176.73:8080
curl: (7) Failed to connect to 10.99.176.73 port 8080: No route to host

I am on 1st worker node now:

root@ip-172-31-14-9:/home/labsuser# curl 10.99.176.73:8080
<h1>This request was processed by host: clusterip-taget-deployement-57c7b9746-n8d66</h1>

I am on 2nd worker node now:

root@ip-172-31-15-229:/home/labsuser# curl 10.99.176.73:8080
<h1>This request was processed by host: clusterip-taget-deployement-57c7b9746-ddx5s</h1>

Not sure why i am not able to access this from master node. Same is not accessible from terminal browser as well.

Same issue with both clusterIP and clusteripnodeport as well.

Thanks & Regards,
Rajesh Kancherla.
 

Rajesh Kancherla

Customer
Customer
Hi Lakshmi Narayanan,

I was working on ClusterIP-deployment, ClusterIP-service and ClusterIP-targetport-deployment and Clusterip-targetport-service. I created deployment and service. However, when I try to run the curl command to the clusterip-service IP address I don't get a response. Ex:
root@ip-172-31-4-135:~/service# kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
clusterip-deployement 3/3 3 3 37m
clusterip-taget-deployement 3/3 3 3 8s

root@ip-172-31-4-135:~/service# kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
clusterip-service ClusterIP 10.101.155.253 <none> 80/TCP 37m
clusterip-targetport-service ClusterIP 10.99.176.73 <none> 8080/TCP 5s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 2d7h

I am on master node now:

root@ip-172-31-4-135:~/service# curl 10.99.176.73:8080
curl: (7) Failed to connect to 10.99.176.73 port 8080: No route to host

I am on 1st worker node now:

root@ip-172-31-14-9:/home/labsuser# curl 10.99.176.73:8080
<h1>This request was processed by host: clusterip-taget-deployement-57c7b9746-n8d66</h1>

I am on 2nd worker node now:

root@ip-172-31-15-229:/home/labsuser# curl 10.99.176.73:8080
<h1>This request was processed by host: clusterip-taget-deployement-57c7b9746-ddx5s</h1>

Not sure why i am not able to access this from master node. Same is not accessible from terminal browser as well.

Same issue with both clusterIP and clusteripnodeport as well.

Thanks & Regards,
Rajesh Kancherla.
Hi Lakshmi Narayanan,

Could you please respond to this query? I still have this issue.

Regards,
Rajesh Kancherla
 

karthik.kln

New Member
Hi Rajesh,

I can able to connect the clusterIP from the master. Please follow the below.

controlplane $ kubectl get nodesNAME STATUS ROLES AGE VERSION
controlplane Ready master 81s v1.18.0
node01 Ready <none> 45s v1.18.0
controlplane $ kubectl apply -f https://raw.githubusercontent.com/Lforlinux/cka/p-deployment.yamllusterip
deployment.apps/clusterip-deployement created
controlplane $ kubectl get deploy
NAME READY UP-TO-DATE AVAILABLE AGE
clusterip-deployement 3/3 3 3 5s
controlplane $
controlplane $ kubectl apply -f https://raw.githubusercontent.com/Lforlinux/cka/p-service.yamls/clusterip
service/clusterip-service created
controlplane $ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
clusterip-service ClusterIP 10.100.147.54 <none> 80/TCP 4s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 2m1s
controlplane $ curl 10.100.147.54
<h1>This request was processed by host: clusterip-deployement-7c8b8dc69-4c44d</h1>
controlplane $

node01 $ curl 10.100.147.54
<h1>This request was processed by host: clusterip-deployement-7c8b8dc69-4c44d</h1>
node01 $

Nodeport service and deployment



controlplane $ kubectl apply -f https://raw.githubusercontent.com/Lforlinux/cka/p-target-service.yamlerip

service/clusterip-targetport-service created

controlplane $ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
clusterip-service ClusterIP 10.100.147.54 <none> 80/TCP 8m7s
clusterip-targetport-service ClusterIP 10.98.48.56 <none> 8080/TCP 3s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP


controlplane $ kubectl apply -f https://raw.githubusercontent.com/Lforlinux/cka/p-target-deployment.yamlp
deployment.apps/clusterip-taget-deployement created

controlplane $ kubectl get deploy
NAME READY UP-TO-DATE AVAILABLE AGE
clusterip-deployement 3/3 3 3 8m10s
clusterip-taget-deployement 3/3 3 3 26s




controlplane $ curl 10.98.48.56:8080
<h1>This request was processed by host: clusterip-taget-deployement-67878f9c9f-mtg2t</h1>
controlplane $

node01 $ curl 10.98.48.56:8080
<h1>This request was processed by host: clusterip-taget-deployement-67878f9c9f-mtg2t</h1>
node01 $
 

Justin Marten

Well-Known Member
I hope this post will be useful for people who wants to take next step in their career and Pass Linux Foundation Certified Kubernetes Application Developer CKAD Exam certification. The range of knowledge as you can see is wide and sometimes you need to know the details, but this Validexamdumps will make you a better specialist and will open more opportunities in front of you. I hope you pass Linux Foundation CKAD exam questions and find your name under Linux Foundation Kubernetes Application Developer Certified Kubernetes Application Developer !

Get Practice Material Guide Here: https://www.validexamdumps.com/linux-foundation/ckad-dumps
 
Top