Stuck on Validating connection to Docker daemon

Details:

Account: Free
Kind: v0.10.0 go1.15.8 darwin/amd64
Kubectl: v1.19.7
Codefresh Concurrent pipelines: Small : 1 Medium : 1 Large : 1

I want to run the codefresh runner on MacOS within Kind. Initially, when I went to install the codefresh runner the acceptance test/networking test was failing with, “Make sure that cluster host address in your kubeconfig is accessible from inside the cluster.” I’d never encountered this before so I this. From this I then attempted to install my runner with:

codefresh runner init --token $CODEFRESH_TOKEN --set-value KubernetesHost=172.19.0.2:6443

the host address being the address and port returned by the kubernetes api root. After this all the codefresh init tasks began passing until test pipeline run. Now my CF_Runner_Demo pipeline just hangs at “stuck on Validating connection to Docker daemon” and ultimately retries many times, always failing and then finally the pipeline itself terminates.

Is it failing to connect to the codefresh dind daemon? My host docker daemon? I assume its the former. Anyway any insight into this would be much appreciated!

  • Jonas

I just noticed that my dind pods have 0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims at the end of its describe. My Mac does have the required storage, at least fundamentally.

kubectl describe nodes shows ephemeral-storage: 119880480Ki which I believe is ~119GB so I think that’s okay.

okay apparently kind doesn’t initially allow PVCs.

okay seems I either need a Dynamic Volume Provisioner or need to create the volumes by hand. Not sure how to get Codefresh to see the volume on init though. I do see the runner config option storage-class-name: Set a name for your custom storage class., but I’m not sure if this will be enough specification.

Hello

I don’t think that the Codefresh runner is certified to work with kind. But I think it should run ok in Docker-for-desktop (and the Kubernetes cluster it comes with).

May I ask why you need kind? Kind is mostly for quick testing and getting embedded in unit integrations suites. Even if you get it to work with the runner, I think you might find other issues in the long run.

@Kostis Oh really. Hm. I mean of course I knew that kind is for local dev, but that’s what makes it so great. It’s push-button local k8s, as opposed to going through the cloud provider process which is, sure, more robust, but also more involved. So I figured that if I could get both k8s and codefresh running locally that I’d have a nifty little lab going. Because for personal dev, i.e. stuff I do outside of work, it is quite convenient to follow a similar automation/cd workflow I would at work without needing to invest any of the money.

So that’s why :slight_smile:

Yes I get that.

My point is that kind is for local TESTING mostly. It is a solution specifically created for Kubernetes tests where you launch a cluster for a brief time, run some tests and then discard it (which is the exact opposite thing that the Codefresh runner wants). The main problem is that kind itself runs inside docker, and the Codefresh runner of course will want to build docker images on its own.

If you are looking for local dev I suggest minikube, docker-for-desktop, microk8s. I suspect also that k3s might be another good choice. They should all work with the Codefresh runner out of the box. All of them are free. There might be several other Kubernetes distributions specifically for local dev.

We have some articles on comparisons as well

Also I want to note that unlike other solutions that you may be familiar with, the Codefresh runner is optional and is mostly for companies that want extra security and full control.

The SAAS version of Codefresh is production ready and perfect for both small and big teams.

Let me know if I can help in any other way.

Hm. All excellent points and advice to consider, thanks @Kostis.