Tomcat on Kubernetes cluster

Hi @royki @akshayyw @juliettet
I’ve got a task to deploy Tomcat on a Kubernetes cluster but when I use curl command to check the result, it returns some weird output!
Please check the below screenshots

Hi @Ashu27 , not sure regarding this error , but all yaml files seem fine . Did you try once via select a port to view option which is available next to the terminal window, instead of just curl ?

NO. I thought it will work with curl too.

Yea it should definitely work with curl , i just suggested a workaround .

In question, they haven’t specified that you need to open a tab and click on display port something like that. Otherwise, they explicitly instruct to check like this.

1 Like

Will let you know if I get the cause of the issue

1 Like

hi @Ashu27, please try to run curl command with an internal ip of controlplane

1 Like

Hi @Ashu27,

Try running curl <node-ip>:<nodeport> . This should work.

1 Like
Hi @Ashu27

As suggested  @juliettet  and  @rahul456  you should use  curl with Internal IP of node on port 32227.

 
kubectl get no -o wide   
                                                                                   
NAME           STATUS   ROLES    AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION       CONTAINER RUNTIME:
controlplane   Ready    master   13h   v1.16.4   172.17.0.8    <none>        Ubuntu 18.04.4 LTS   4.15.0-109-generic   docker://19.3.6
node01         Ready    <none>   13h   v1.16.0   172.17.0.11   <none>        Ubuntu 18.04.4 LTS   4.15.0-109-generic   docker://19.3.6


check tomcat on nodeport '32227' thru internal ip 172.17.0.8:
------------------------------------------------------------- -----------------                 

curl 172.17.0.8:32227   

<!DOCTYPE html>                                                                                                               
<!--                                                                                                                          
To change this license header, choose License Headers in Project Properties.                                                  
To change this template file, choose Tools | Templates                                                                        
and open the template in the editor.                                                                                          
-->                                                                                                                           
<html>                                                                                                                        
    <head>                                                                                                                    
        <title>SampleWebApp</title>                                                                                           
        <meta charset="UTF-8">                                                                                                
        <meta name="viewport" content="width=device-width, initial-scale=1.0">                                                
    </head>                                                                                                                   
    <body>                                                                                                                    
        <h2>Welcome to xFusionCorp Industries!</h2>                                                                           
        <br>                                                                                                                  
                                                                                                                              
    </body>                                                                                                                   
</html> 

Good Luck !

2 Likes

Hi @rahul456 thank you so much! This solved my issue.

1 Like

Hi @juliettet
thank you so much this helped me a lot.

1 Like

Hi @Sameer thank you so much for this! This helped me.

1 Like

Woo hoo!! I’m glad that we were all able to help out:-)