- Alex Stockinger
- Mittwoch, 15. Mär 2023
- 11:00 - 11:45
- Track 2
- Session
The development of Kubernetes-Operators in Java is not a frequent sight at the moment. Usually Go comes into play for that - surely owed to the better tooling and testing-support. The library kindcontainer based on the integration testing framework testcontainers tries to help turning the tide regarding testdriven development of operators and controllers. No matter if you only need the Kubernetes control plane for your test, or if you're interested in the interaction of multiple operators until a certain workload becomes ready - using isolated Kubernetes instances in Docker containers as a reliable and easy testing strategy is becoming a reality.
After a short introduction to the challenges of developing Kubernetes operators in a testdriven fashion using live coding examples this presentations demonstrates how testcontainers can be used to run your test cases in isolated Kubernetes instances from JUnit. To round off the tour more advanced topics beyond your average Hello-World example will be touched on: accessing a private docker registry with a custom TLS infrastructure from your test cases - or exposing and testing REST-Interfaces inside the Kubernetes container using Ingress.