Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes Service not created #57

Closed
christophd opened this issue Oct 26, 2023 · 6 comments
Closed

Kubernetes Service not created #57

christophd opened this issue Oct 26, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@christophd
Copy link

The Kubernetes Service is missing when running a Testcontainer (e.g. PostgreSQL) with Kubedock. The container does export the port properly but there is no Service resource created. I tested this with Kubedock v0.14, v0.13 and v0.12 and was not able to get this running. The last version that did work for me is v0.10

Adding --inspector option also does not help.

Any hints are much appreciated. Many thanks!

@joyrex2001 joyrex2001 added the bug Something isn't working label Oct 26, 2023
@joyrex2001
Copy link
Owner

I removed it here: 625b4ab because I thought it was not used. :-/

@joyrex2001
Copy link
Owner

Reverted the change, can you confirm this is what you expected?

@christophd
Copy link
Author

I am not tied to the kd-* service name but I'd expect that a Service resource is being created when there is an exposed port on the container. I also see that this is currently not working with a NetworkAlias set on the Testcontainers container.

@joyrex2001
Copy link
Owner

joyrex2001 commented Oct 27, 2023

How are you using/determining which service to use? The network alias services (named according to that alias) didn't change. Another change that might have impacted you is that kubedock not creates deployments anymore, but pods directly.

@christophd
Copy link
Author

Ah, now I see what has been missing on my side. Setting .withNetworkAliases("foo") on the Testcontainer only is not enough. I also need to set .withNetwork(Network.newNetwork()) and I was missing this before.

With that in place I do actually see the Kubernetes Service being created properly. Thank you, that works for me! Sorry for the noise!

@joyrex2001
Copy link
Owner

joyrex2001 commented Oct 27, 2023

No worries, thanks for reporting. I will leave the default generated service in. I removed the kd- default service again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants