For the perfect template. π₯π₯π₯
- Routing - Gin Web Framework ---------------------------- π
- CLI - Cobra ------------------------------------------------- π
- DI pattern - Fx --------------------------------------------- π
- Environment - Viper ---------------------------------------
- Logging - Zap ----------------------------------------------
- PostgreSQL ORM - GORM --------------------------------- π
- Redis ORM - Go-Redis ------------------------------------- π
- DB Viewer - pgAdmin4 (Web) ----------------------------- π π³
- Authentication - JWT (Access + Refresh) ----------------- π
- Makefile - make -------------------------------------------- π
- CI/CD - GitHub-Actions ------------------------------------ π
- CNI(Container Network Interface)- flannel ---------------
- Load Balancer - MetalLB ----------------------------------- π
- Ingress - NGINX -------------------------------------------- π
- AutoScaling - k8s-HPA ------------------------------------- π
Make sure you have make
installed.
$ sudo apt install make
$ make deploy-to-docker-desktop
# Check the IP of the Kubernetes control plane.
$ kubectl cluster-info
Kubernetes control plane is running at https://10.0.0.8:6443
CoreDNS is running at https://10.0.0.8:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
# Edit the addresses of ipaddress-pools.yaml.
$ vi k8s/ipaddress-pools.yaml
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: first-pool
namespace: metallb-system
spec:
addresses:
- 10.0.0.8-10.0.0.8 <---- edit IP
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: l2-advert
namespace: metallb-system
$ make deploy-to-cloud
# Push the API Docker Image to the DockerHub.
$ make push_api
# Push the PostgreSQL Docker Image to the DockerHub.
$ make push_postgres
# Push the Redi Docker Image to the DockerHub.
$ make push_redis
# Push the pgAdmin4 Docker Image to the DockerHub.
$ make push_pgadmin4
# Push the All Docker Image to the DockerHub.
$ make push_all
# Deploy to the Docker Desktop. (WSL + Docker Desktop)
$ make deploy-to-docker-desktop
# Undeploy to the Docker Desktop. (WSL + Docker Desktop)
$ make delete-to-docker-desktop
# Deploy to the Public Cloud.
$ make deploy-to-cloud
# Undeploy to the Public Cloud.
$ make delete-to-cloud