Skip to content

pattonjp/localcluster

Repository files navigation

localcluster

early attempt at migrating bash scripts into an executable. this was created for my own personal dev workflow.

the purpose of the binary is to wrap k3d, kubectl, and helm to quickly create a kubernetes dev cluster with ingress, monitoring, logging, and a postgres database ready for development.

installation

> go install github.com/pattonjp/localcluster
# add completions to your shell (zsh is what is shown below.)
> source <(localcluster completion zsh)

# help is available on all commands as well

updates

to opt in for self updating of the binary run the following command:

localcluster version update

as new versions are released the application will begin to prompt you to self update when a new version is released.

quickstart

  1. get dependencies installed. if you have asdf already installed just run the localcluster setup command for additional dependencies. otherwise ensure the dependencies below are installed.
  2. create the cluster localcluster create

once the cluster is created you should now be able to access:

  • traefik dashboard ingress
  • grafana loki is configured for log aggregation login with user admin pwd admin
  • prometheus for metrics collection
  • postgres
    # example connection:
    > psql "postgres://postgres:admin@localhost:32500/postgres"
  • localstack fully functional local aws cloud stack see the docs here
      # helpful to add an alias like so:
      
      > export LOCALSTACK_HOST=localstack.localdev.me
      > alias awslocal="AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test  aws --endpoint-url=http://${LOCALSTACK_HOST:-locals}"
      
      # now you can use just like the aws cli like so:
      > awslocal s3api list-buckets

dependencies

  • asdf used for dependency management
  • helm for deployments
  • kubectl for deployment customizations
  • k3d for cluster management
  • mkcert for ssl in the cluster

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published