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.
> 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
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.
- 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. - 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
pwdadmin
- 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