Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.5 KB

kind.md

File metadata and controls

52 lines (41 loc) · 1.5 KB

Kind Setup

This document describes how to setup a local Kubernetes cluster using kind.

It uses demo-a as the name, which follows the convention of Armadas Dev Setup

Prerequisites

Create a cluster config file

Create a file named kind-config.yaml with the following contents:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    image: "kindest/node:v1.21.10"
    kubeadmConfigPatches:
    - |
      kind: InitConfiguration
      nodeRegistration:
        kubeletExtraArgs:
          node-labels: "ingress-ready=true"
    extraPortMappings:
    - containerPort: 80
      hostPort: 80
      protocol: TCP
    - containerPort: 443
      hostPort: 443
      protocol: TCP

  - role: worker
    image: "kindest/node:v1.21.10"

Create the cluster

The following code will setup the cluster and install the ingress controller:

kind create cluster --name demo-a --config kind-config.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kubectl wait --namespace ingress-nginx \
  --for=condition=ready pod \
  --selector=app.kubernetes.io/component=controller \
  --timeout=90s