Kind does not work with rancher desktop, trying to use manifest file with k3d

Hi, Kubernetes newbie here.
I was learning Kubernetes via the docker desktop in Mac M1 ARM chip laptop.
K3d and kind tool was working, however eventually moved to rancher desktop becuase of port forwarding issue.
K3d works fine like:
k3d cluster create --servers 1 agents 3 --image …

First question is if I can use k3d to deploy pods via a manifest file?

Secondly, kind is not working with rancher desktop/mac OS
I get this:
✓ Ensuring node image (kindest/node:v1.26.0) :framed_picture:
✓ Preparing nodes :package: :package: :package: :package:
✗ Writing configuration :scroll:
Deleted nodes: [“tkb-control-plane” “tkb-worker2” “tkb-worker” “tkb-worker3”]
ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: failed to get file: command “docker exec --privileged tkb-worker2 cat /kind/version” failed with error: exit status 1
Command Output: Error response from daemon: Container 7ddf0df3e6f8d748a671f7ecd4f3fcb392ffeada89d3c87a10ec35dcbaef066c is not running

I basically want a tool that will work to deploy pods via manifests file, whether it is k3d or any other tool.
Not sure if I can fix the kind error as above

Thanks

Rancher Desktop’s alpine based image for running containers (and kind) is non-standard and lacks the capability to mount the needed volumes (/sys/fs/cgroup) for kind to work correctly. For more information see this issue:

For a specific comment from one of the rancher desktop maintainers:

thanks, I am using k3d at the moment.
Can we create a cluster in k3d via a manifest file?
At the moment I am just using command line to create.
Thanks

Hey Ahmed,

Of course, Rancher K3d allows you to create a Kubernetes cluster using a manifest file :slight_smile:
Here’s an example of a simple configuration file named Kerem-ExampleCluster-config.yaml


apiVersion: k3d.io/v1alpha2
kind: Cluster
name: my-cluster
servers: 1
agents: 2


To create the cluster using this configuration file, run:

k3d cluster create --config my-cluster-config.yaml

After creating the cluster, verify its status and nodes using kubectl:

kubectl cluster-info
kubectl get nodes

Voila ! Now that your cluster is up, you can deploy applications, services, and other resources using Kubernetes manifests.

Happy Kubernetes-ing!

Kerem ÇELİKER
Head of Cloud Architecture
linkedin.com/in/keremceliker/

1 Like

thanks, this is what I am after, thanks much