Aug 172020
 

KubernetesにはDockerコンテナーをノードにしてクラスター構成をテストするためのkind(Kubernetes IN Docker)というプロジェクトがあります。

私はDockerではなくPodmanを使っているのですが、「podmanコマンドはdockerコマンドと互換なんだからいけんじゃね?」と安易に考えてPodmanでkindを試すと以下のissueに引っかかります(kind v0.8.1)。

[podman] kind 0.8.1 fails to download node image because podman is incompatible with image:tag@sha256 #1700

ちなみにArch Linuxにはkindという名前でaurパッケージが提供されていますが、こちらはdockerパッケージに依存するため、リポジトリからリリース版をダウンロードする方式で試しています。

issueに出ているworkaroundのKIND_EXPERIMENTAL_PROVIDER=podmanを指定してみると今度は別のエラーが。こちらもissueが出ています。

Cannot start with podman backend due to AppArmor errors #1757

どうやら最新版には修正が入っているようですので、最新版をgit cloneしてビルド、実行してみると無事動かすことができました!

$ git clone https://github.com/kubernetes-sigs/kind.git
$ cd kind
$ make build
$ sudo env KIND_EXPERIMENTAL_PROVIDER=podman ./bin/kind create cluster
using podman due to KIND_EXPERIMENTAL_PROVIDER
enabling experimental podman provider
Creating cluster "kind" …
✓ Ensuring node image (kindest/node:v1.18.8) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Thanks for using kind! 😊
$ sudo kubectl cluster-info --context kind-kind
Kubernetes master is running at https://127.0.0.1:46483
KubeDNS is running at https://127.0.0.1:46483/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
$

これからいろいろKubernetesも試してみようと思います。

Sorry, the comment form is closed at this time.