基于idea做java程序的本地k8s调试-skaffold(二) - McKay
source link: https://www.cnblogs.com/aarond/p/ci-2.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
基于idea做java程序的本地k8s调试-skaffold(二)
上一篇讲完了java代码发到本机minikube中run,这篇来讲讲minkube中进行debug(idea下)
话说,上篇是把pigx基础infra微服务都发到了minikube中,这些微服务是run方式进入的,我们不想debug,但是业务微服务是我们希望debug的
我们分成两部分:
- pigx-infra部分
- business部分
然后就方便了,infra部分RUN起来,business部分debug起来
访问个url试试:
debug进去的pod都被skaffold动态改了点参数,每个都注入了JDWP代理,每个pod都暴露1个5000网上的端口用来提供jvmti服务
idea这边,这个cloud插件也会配合着自动启动一个remote debug进程来监听这个500x的端口
如下图所示,就是通过JAVA_TOOL_OPTIONS环境变量来注入JDWP代理
这篇有点短,就这样吧,等后续有了其他心得再写。
心怀远大理想。
为了家庭幸福而努力。
物流行业算法交流 QQ群:1138428297
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK