0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

kindind(k8s in docker in docker)の環境を作成する

Posted at

kindind(k8s in docker in docker)の環境を作成する

背景

k8sマジでわからんので軽く環境欲しいなと思っていた。
dind(docker in docker)をdocker blogで目にしたので、kind in dindの環境構築を作ってみた。

directory

tree .
.
├── Makefile
├── compose.yaml
└── dockerfile

1 directory, 3 files
compose.yaml
services:
  kind:
    container_name: kind_container
    privileged: true
    build:
      context: .
      dockerfile: dockerfile
    tty: true
    restart: on-failure:3
FROM docker:dind

# kind
RUN apk add curl && \
    curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-arm64 && \
    chmod +x ./kind && \
    mv ./kind /usr/local/bin/kind && \
    kind version

# kubectl
RUN curl -LO "https://dl.k8s.io/release/v1.32.0/bin/linux/arm64/kubectl" && \
  curl -LO "https://dl.k8s.io/release/v1.32.0/bin/linux/arm64/kubectl.sha256" && \
  echo "$(cat kubectl.sha256)  kubectl" | sha256sum -c && \
  chmod +x kubectl && \
  mkdir -p ~/.local/bin &&\
  mv ./kubectl /usr/local/bin/kubectl && \
  kubectl version --client --output=yaml
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?