必须出席docker的testcontainers,以使testcontainers与Containerd Nodes在GKE上正常工作

发布于 2025-02-04 18:27:01 字数 1172 浏览 4 评论 0原文

我正在准备我们的GKE簇,以使Kubernetes 1.24的未来更新。此版本删除了Dockershim的支持,因此使用新的容器运行时是集装箱。因此,我生成了一个新的基于容器的节点池。

我们的Jenkins服务器正在Kubernetes上运行,并且正在使用 kubernetes插件作为pods的提供动态代理。

代理配置包括一个主机路径卷,可提供对Docker的访问:

java.lang.IllegalStateException: Failed to load ApplicationContext
  
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'dockerPresenceMarker' defined in class path resource 
[com/playtika/test/common/spring/DockerPresenceBootstrapConfiguration.class]: 
Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: 
Failed to instantiate [com.playtika.test.common.spring.DockerPresenceMarker]: 
Factory method 'dockerPresenceMarker' threw exception; nested exception is 
com.playtika.test.common.spring.DockerNotPresentException: Docker must be present 
in order for testcontainers to work properly!

​詹金斯特工的集装箱?

I'm preparing our GKE clusters for a future update to Kubernetes 1.24. This version removes dockershim support so the new container runtime to use is containerd. Thus, I've generated a new containerd based node pool.

Our Jenkins server is running on Kubernetes, and is using the kubernetes plugin to provision dynamic agents as pods.

The agent configuration included a host path volume to provide access to Docker:

enter image description here

After switching to containerd workers, testcontainers doesn't work anymore, throwing the folloging exception:

java.lang.IllegalStateException: Failed to load ApplicationContext
  
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'dockerPresenceMarker' defined in class path resource 
[com/playtika/test/common/spring/DockerPresenceBootstrapConfiguration.class]: 
Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: 
Failed to instantiate [com.playtika.test.common.spring.DockerPresenceMarker]: 
Factory method 'dockerPresenceMarker' threw exception; nested exception is 
com.playtika.test.common.spring.DockerNotPresentException: Docker must be present 
in order for testcontainers to work properly!

What should I do to allow testcontainers to work with containerd on Jenkins agents?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文