简体   繁体   中英

How to run/deploy Spring Boot Microservice from IntelliJ into local Kubernetes cluster?

I have a local Kubernetes cluster running, and I'm working on Spring Boot Microservices from IntelliJ. Is there a way I can deploy the Microservice Docker images directly into that Kubernetes cluster by just hitting 'Run' for regular development and debugging?

WHY In the environment, one microservice can call another service with,

http://another-service:80

but everytime I need to run the service from local, I have to change all references to:

http://localhost:<some-port>

I understand I can use local config but there are similar issues. If I am able to do this, I can replicate production into the local machine as well.

I tried various IDE plugins, the docker files I have works fine into production but not sure what I can proceed with on local. I know this is quite wide question.

You can use google cloud code extension plugin for IntelliJ to deploy spring boot apps to a Kubernetes cluster. This uses skaffold internally which handles the workflow for building, pushing and deploying your application to kubernetes cluster.

https://cloud.google.com/code/docs/intellij/deploying-a-k8-app

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM