Skip to content

onzyone/k8s-kind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is just a quick way to setup kind and a local docker regestry

$ bin/kind-local-setup.sh
usage: kind-local-setup.sh start|stop|getimages

Confirmed working with:

  • kind: v0.8.1
  • tilt: v0.13.4

Table of contents

Usage

Mac OS only

  1. Mac OS:

Start

  1. In the bin dir of this repo you will find the start / stop script
$ bin/kind-local-setup.sh start
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.16.3) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
✓ Joining worker nodes 🚜
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂

Get images

This has been moved into the tiltfie: k8s-tilt

Deploy with Helm

This has been moved into the tiltfie: k8s-tilt

Stop

  1. Run the following to stop kind and the local registry.
    $ bin/kind-local-setup.sh stop
    Deleting cluster "kind" ...
    kind-registry

Troubleshooting

  1. Note: you may update your local hosts file as well, for example by adding 127.0.0.1 registry in your laptop's /etc/hosts, so you can reference it in a consistent way by simply using registry:5000
  2. check what images are in the local repo, if you do not see a list of images please run the commands in this section: Get Images
    $ curl localhost:5000/v2/_catalog -s | jq
    {
      "repositories": [
        "datawire/ambassador",
        "hello-app"
      ]
    }
  3. Quick test (if this pod doesn't deploy, please have a look at the troubleshooting section)
    $ kubectl create deployment hello-server --image=registry:5000/hello-app:1.0
    $ kubectl get po -w
    NAME                            READY   STATUS    RESTARTS   AGE
    hello-server-7f9c5b8577-2n7x2   1/1     Running   0          10s
  4. ingress test
    $ kubectl run echo --image=registry:5000/inanimate/echo-server --port=8080
    $ kubectl expose deployment echo --type=LoadBalancer
    $ kubectl get service
    NAME                         TYPE           CLUSTER-IP       EXTERNAL-IP    PORT(S)                      AGE
    echo                         LoadBalancer   10.107.67.130    172.17.255.2   8080:32105/TCP               17m
    $ curl 172.17.255.2:8080
    More reading (On Mac only)
  5. unknown hook The chart has not been updated to support helm 3 yet
    ...
    manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
    ...

Reference Documentation:

Dependency

  1. linux vm
  2. docker installed, as well as the ability to pull images from the internet
  3. kind
  4. k8s tools (kubectl, helm 3 or greater)

Releases

No releases published

Packages

No packages published

Languages