Skip to content

Instantly share code, notes, and snippets.

@neilkuan
Created April 26, 2021 05:57
Show Gist options
  • Save neilkuan/a581d5cd307394b5d5af661f7a9c750d to your computer and use it in GitHub Desktop.
Save neilkuan/a581d5cd307394b5d5af661f7a9c750d to your computer and use it in GitHub Desktop.

kind.yaml

apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
  - role: control-plane
    extraPortMappings:
      - containerPort: 30002  
        hostPort: 30002       
  - role: worker

create kind cluster

kind create cluster --config kind.yml

get ckuster info

kubectl cluster-info --context kind-kind

use kind ckuster to default

kubectl config use-context kind-kind

load localhost images like after docker build -t mylocal-image:v1 .

kind load docker-image mylocal-image:v1

delete kind cluster

kind delete clusters kind

more datail see

https://kind.sigs.k8s.io/docs/user/quick-start/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment