I was playing with k8s deployment with change of port for service,container and ingress.I am curious to know how the deployment is working.
my scenario : To deploy one rest service application hosting 2 endpoints.
Case 1:
containerPort: 8081 - # port for container
port: 8081 #port of the service targetPort: 8081
Host1 port : 8081 #port of the ingress Host2 port :8081
Result : deployed successfully using bamboo pipeline as expected.
Case 2: containerPort: 8080 - # port for container
port: 8080 #port of the service targetPort: 8081
Host1 port : 8081 #port of the ingress Host2 port :8081 Result : Deployment is getting failed in bamboo but health check and all end points are working fine.
Case 3:
containerPort: 8080 - # port for container
port: 8080 #port of the service targetPort: 808
Host1 port : 8080 #port of the ingress Host2 port :8080
Result : deployment unsuccessful in bamboo which is also expected because another host is running also in 8080 in the same cluster.
I am really not sure why Case 2 is failing. Can someone help me?
code block
as for now, it's not really easy to read. Also can you provide some more info and background, please ? Remember that we are not working in your current project so we don't know the current situation. – Marc ABOUCHACRA