Closed jamesbeltonIBM closed 4 years ago
@jamesbeltonIBM What was the error message you were seeing? The yaml for the lb service shouldnt have to be deployed in the same ns as your app to work
Hi @Rachael-Graham - I didn't see any error message, all I got was a timeout from my browser when I went to access the page via the address of the VPC LoadBalancer - or a 'the server returned an empty response' message when I used cURL on the command line. As mentioned, once I added in the namespace line, so that the loadbalancer was in the same namespace as the app (no other syntax change), it came to life. Again, I didn't see any documentation around using a different namespace, it was just by looking at the Kubernetes dashboard, that I kinda thought 'hey, maybe my load balancer needs to be in the same namespace and not in 'default', and that's what worked.
I added ns as an optional flag for deploying into non-default namespaces. Thank you for your feedback!
Hi,
re: https://cloud.ibm.com/docs/containers?topic=containers-vpc-lbaas
I spent a lot of time working from this page yesterday, trying to get my loadbalancer to work, despite my loadbalancer.yaml script being 'correct' as per the documentation. I eventually realised (after several hours) that the problem was that I had put my application into it's own namespace called 'example-health' within the cluster and only really saw / realised this could be the problem when I saw within the Kubernetes Dashboard that the application was under 'example-health' and the loadbalancer under 'default'. As a 'punt' I added the line:
namespace: example-health
to my loadbalancer.yaml file and the thing suddenly sprang into life!Can you please add this into the documentation (i.e. the namespace: component to the code as well as an explanation as to how it is derived) as I am sure that I am not going to be the only semi-practiced Kubes user coming across this with Kubes on VPC in the near future and it will save hours of head scratching, to the point where I was about to give up.