Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 1.95 KB

README.md

File metadata and controls

65 lines (44 loc) · 1.95 KB

k8s-dev-cluster

Deploy a local kubernetes cluster for development purpose. This repository contains all the necessary tools to create a local kubernetes cluster using Kind and Helmfile

Prerequisites

Usage

Create Cluster

chmod +x ./create_cluster.sh
./create_cluster.sh

Get Kubeconfig

➜ kind get kubeconfig --name local-k8s > ~/.kube/config

If you want to access the cluster from another machine, you need to change your kubeconfig file a little bit:

clusters:
  - name: kind-local-k8s
    cluster:
      # need to remove "certificate-authority-data" otherwise "insecure-skip-tls-verify" will not work
      server: https://x.x.x.x:6443 # change this to your IP address where "Kind" cluster is running
      insecure-skip-tls-verify: true # add this

Install Necessary Tools using Helmfile

helmfile --file ./helm deps
helmfile --file ./helm sync

After that, you can access the cluster using kubectl:

➜ kubectl get nodes                                                                            
NAME                      STATUS   ROLES           AGE   VERSION
local-k8s-control-plane   Ready    control-plane   27m   v1.25.3

Contributing

If you want to contribute to this repository, please create an issue first, then create a pull request with your changes. If the changes can help other developers, we can proceed with the pull request.

Create Issue

If you have any questions or issues, please create an issue here

Disclaimer

This repository is only for development purpose. Do not use it in production.