My POD fails to read kubernetes configmap in a specific combination of software/versions:
Container: containerd
Kubernetes version: 1.17.4
docker base image: openjdk:8
When deploying the POD, I get:
Failed to get pod with name:[...]. You should look into this if things aren't working as you expect. Are you missing serviceaccount permissions?"
Operation: [get] for kind: [...] with name: [...] in namespace: [...] failed
at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64)
at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:72)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.getMandatory(BaseOperation.java:221)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:177)
--- 8< ---
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: okhttp3.internal.http2.ConnectionShutdownException: null
at okhttp3.internal.http2.Http2Connection.newStream(Http2Connection.java:219)
--- 8< ---
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.getMandatory(BaseOperation.java:210)
... 24 common frames omitted
I know that there are various reasons for this error, like serviaccount permissions. But this used to work for a long time. Only thing I have changed is to switch from baseimage openjdk:8
to openjdk:8-alpine
.
It works fine again when switching back to the alpine image. But alpine has some DNS issues resulting in slow connections.
Any idea, why this happens?