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?

0

There are 0 best solutions below