This application was designed to practice and test cloud infrastructure deployments.
All microservices are available on GitHub:
git clone https://github.com/dalthonmh/todoapp-auth
git clone https://github.com/dalthonmh/todoapp-core
git clone https://github.com/dalthonmh/todoapp-webTo run each project individually, navigate into their respective folders and follow their installation steps.
Local Environment Setup
We will use kind to run a local Kubernetes cluster using Docker.
kind create cluster --config - <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
EOFNote: If you need to delete an existing cluster before starting, run:
kind delete cluster --name kind
Apply the Ingress Nginx manifest compatible with Kind:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yamlNote: If you have created a cluster with more than one node, make sure that the ingress-nginx-controller pod is running in the Control Plane.
With kustomize on kubectl apply the following
kubectl apply -k infra/k8s/todoapp/overlays/dev
kubectl apply -k infra/k8s/components/overlays/devConfigure Local Access
To access the application in the browser, you need to configure your hosts file:
- For macOS/Linux
vim /etc/hosts- For Windows: Open the file as Administrator
"C:\Windows\System32\drivers\etc\hosts"Add the following line at last:
127.0.0.1 todoapp.test
Then you can test on the browser at http://todoapp.test