r/SpringBoot • • Jul 21 '24

docker, kafka, kubernetes

I've been struggling with my recent job change. I only recently know that the industry requires docker, kafka, and Kubernetes from developers. I didn't know this until spring not too long ago. I'm currently taking devops lectures at Udemy. I have experience with Linux and servers but no experience with these tools lately. It's my fault for not detecting the change. How fast it changes..!😵‍💫😱😭

24 Upvotes

15 comments sorted by

View all comments

5

u/olekj Jul 21 '24

IMO the best way to learn is to do it yourself. While learning, try to setup a local k8s cluster with something like minikube or k3s and go from there… check how to deploy your app with k8s manifests, then move to helm or kustomize

1

u/olekj Jul 21 '24

You should throw docker compose to the list to be honest, is super used for local testing / development

1

u/Dependent_Staff_6891 Jul 21 '24

Thank you for your advice. I’m very nervous because I’ve fallen so often in the job apply,😭 but I can’t ignore this study. I hope there will be a good result.

4

u/olekj Jul 21 '24

Don’t be nervous… after you get it, it is always the same… I’ll try do do a small summary.

For Dockerfiles you want to look for multistage dockerfiles, once you have managed to do one the others will be the same - https://docs.docker.com/guides/docker-concepts/building-images/multi-stage-builds/

For docker compose just try to spin up a database and connect a service to it, this way you will understand how docker networking works. Then you can explore more complex topics but for starters that is fine - https://www.baeldung.com/spring-boot-postgresql-docker

For k8s spin up cluster like I’ve told you. Documentation is pretty straightforward and you can see it on k8s official website - https://kubernetes.io/docs/tutorials/hello-minikube/

As for k8s, from a developer perspective there isn’t much for you to know:

  • deployment manifests are used to managed the pod (replicas, resources, environment vars, etc…)

  • service is used for networking

  • ingress rules are used to tell your ingress controller how to reach your service if it needs to be external available

  • secrets store base64 secrets that can be attached to the pods via the deployment

GL