You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use MacOS as your daily driver and need a functional IPv6 enabled Kubernetes cluster for local development/testing this article is meant for you! I have been using [orbstack](https://orbstack.dev) for a few years now as a drop in replacement for Docker desktop and I have to say it's beyond impressive in terms of performance and features. My main motivation to move away from Docker desktop was the lack of support IPv6 on a MacOS and the horrendous performance. The next thing I tried was Colima which is quite flexible but still [lacks IPv6 support on MacOS](https://news.ycombinator.com/item?id=41422931).
9
10
10
-
While there are multiple kubernetes distributions such as [minikube](https://github.com/kubernetes/minikube/issues/8535), [k3d](https://github.com/k3d-io/k3d/issues/833) which work quite well on a MacOS, neither of those support IPv6 😭 Eventually I ended up trying [KIND](https://kind.sigs.k8s.io) and turns out, it works perfectly fine with IPv6 and is fully customizable 🎉
11
+
While there are multiple kubernetes distributions such as [minikube](https://github.com/kubernetes/minikube/issues/8535), [k3d](https://github.com/k3d-io/k3d/issues/833) which work quite well on a MacOS, neither of those support IPv6 😭 Eventually I ended up trying [KIND](https://kind.sigs.k8s.io) and turns out, it works perfectly fine with IPv6 and is fully customizable 🎉
11
12
12
-
If you look under the hood, Kubernetes is an API server which relies on composable set of components to build a distributed system. Kubernetes by itself does not handle networking just as it does not handle managing container lifecycle, it relies on a container runtime such as containerd. Similarly, k8s relies on a container network interface [CNI](https://cni.dev) which is the component that manages cluster networking and routing network traffic in and out of the cluster. But to make a Kubernetes cluster IPv6 capable, we need to install a CNI which supports IPv6. Cilium is my CNI of choice as it support IPv6, has a large community around it and is a CNCF graduate project which speaks for it's maturity. I will write more about Cilium and other CNI's in a separate blog post ;)
13
+
If you look under the hood, Kubernetes is an API server which relies on composable set of components to build a distributed system. Kubernetes by itself does not handle networking just as it does not handle managing container lifecycle, it relies on a container runtime such as containerd. Similarly, k8s relies on a container network interface [CNI](https://cni.dev) which is the component that manages cluster networking and routing network traffic in and out of the cluster. But to make a Kubernetes cluster IPv6 capable, we need to install a CNI which supports IPv6. Cilium is my CNI of choice as it support IPv6, has a large community around it and is a CNCF graduate project which speaks for it's maturity. I will write more about Cilium and other CNI's in a separate blog post ;)
Enable IPv6 in Docker daemon with the following config.
36
+
Enable IPv6 in Docker daemon with the following config.
37
+
36
38
```sh
37
39
❯ cat .orbstack/config/docker.json
38
40
{
@@ -46,6 +48,7 @@ Enable IPv6 in Docker daemon with the following config.
46
48
Create a file named `kind-config.yaml` to pre-configure KIND with the following config options. Notice that I am disabling the default CNI (flannel) so I can install Cilium 😋
47
49
48
50
#### kind-config.yaml
51
+
49
52
```YAML
50
53
---
51
54
kind: Cluster
@@ -62,7 +65,7 @@ networking:
62
65
nodes:
63
66
- role: control-plane
64
67
- role: worker
65
-
- role: worker
68
+
- role: worker
66
69
```
67
70
68
71
Bootstrap the cluster.
@@ -92,6 +95,7 @@ Next we install Cilium CNI with IPv6 enabled
92
95
```
93
96
94
97
Optionally, we can enable Hubble as well!
98
+
95
99
```bash
96
100
❯ helm upgrade -n kube-system \
97
101
cilium cilium/cilium \
@@ -100,8 +104,9 @@ Optionally, we can enable Hubble as well!
100
104
--set hubble.ui.enabled=true
101
105
```
102
106
103
-
The installation takes about 2-3 mins. We can monitor progress using the following
104
-
```
107
+
The installation takes about 2-3 mins. We can monitor progress using the following
External IP shows as none but that is expected since we created a service of type `NodePort` which is exposed over port `30368`. To access a NodePort service we can send a http GET request to any of the cluster nodes over this port.
130
136
131
137
```bash
132
-
❯ curl -6 http://\[fc00:f853:ccd:e793::3\]:30368
138
+
❯ curl -6 http://[fc00:f853:ccd:e793::3]:30368
133
139
<!DOCTYPE html>
134
140
<html>
135
141
<head>
@@ -158,4 +164,5 @@ Commercial support is available at
158
164
Voila!🍾 our application is running on Kubernetes and is accessible over IPv6!
159
165
160
166
### Conclusion
161
-
Running an IPv6 capable Kubernetes cluster is absolutely possible on a MacOS and developers can leverage this setup to develop and test their applications in a IPv6 native environment.
167
+
168
+
Running an IPv6 capable Kubernetes cluster is absolutely possible on a MacOS and developers can leverage this setup to develop and test their applications in a IPv6 native environment.
0 commit comments