Coder Social home page Coder Social logo

kind-tests's Introduction

Setup a local k8s cluster using Kind

Index

Prerequisites

  • Kind (tested with 0.22.0)
  • Docker-Desktop (tested with 4.26.1, make sure that Advanced/'Allow the default Docker socket to be used (requires password)' box is checked on the docker-desktop configuration panel)
  • kubectl (tested with 1.29.2)
  • Helm (tested with 3.14.2)
  • (Optional) k9s

Setup


Install Docker Mac Net Connect

Install Docker Mac Net Connect on your machine to be able to connect directly to Docker-for-Mac containers via their IP addresses.

brew install chipmk/tap/docker-mac-net-connect
sudo brew services start chipmk/tap/docker-mac-net-connect
# To check:
brew services list

Install Task

brew install go-task

Create a certificate authority for kind (ca.kind)

task create-ca

Create a kind cluster : Automatic setup

You can try to use the setup-kind or the setup-kind-ha tasks to install kind with metallb, cert-manager and nginx-ingress controller.

For a single node cluster (1 container) :

task setup-kind

For a HA cluster (5 containers) :

task setup-kind-ha

Create a kind cluster : Manual setup

Create kind cluster

Prepare the cluster config file (X-cluster-config.yaml) and then create the cluster. Kind will create a config file to the KUBECONFIG path (Make sure to set the KUBECONFIG environement variable to set a custom path if needed, ~/.kube/config is the default one). For a single node cluster (1 container) :

kind create cluster --config=small-cluster-config.yaml

For a HA cluster (5 containers) :

kind create cluster --config=ha-cluster-config.yaml
task install-metallb

Deploy Cert manager

task install-cert-manager

Deploy ingress controller (nginx)

task install-nginx-ingress

TODO : Install & configure dnsmasq

Install & configure dnsmask on your machine to have a .kind local domain (https://gist.github.com/ogrrd/5831371)

kind-tests's People

Contributors

mlahouar avatar sergealexandre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.