Projeto para simular empréstimos financeiros em um banco para clientes
- Registrar cliente
- Buscar cliente por documento
- Solicitar empréstimo
- Aprovar/Reprovar empréstimos
- Listar empréstimos de um cliente
- Na raiz do projeto executar o seguinte comando:
docker-compose up -d
-
Instalando minikube (Windows)
choco install minikube
-
Instalando kubernetes-cli (Windows)
choco install kubernetes-cli
-
Para iniciar o ambiente minikube (local)
minikube start
-
Para aplicar os manifestos do k8s
kubectl apply -f .\.k8s\metrics\ -R kubectl apply -f .\.k8s\namespaces\ -R kubectl apply -f .\.k8s\deployments\ -R -n bank kubectl apply -f .\.k8s\services\ -R -n bank kubectl apply -f .\.k8s\certmanager\ -R -n bank kubectl apply -f .\.k8s\ingress\ -R -n bank kubectl apply -f .\.k8s\hpas\ -R -n bank
-
Habilitar dashboard kubernetes
minikube dashboard minikube tunnel
-
Habilitar portas dos serviços para utilizar localmente
minikube service mongodb-service -n bank minikube service rabbitmq-service -n bank minikube service customer-api-service -n bank minikube service loan-api-service -n bank
-
Alternando entre contextos
kubectl config get-contexts kubectl config use-context (nome do contexto)
-
Listando pods
kubectl get pods -n bank
-
Listando services
kubectl get svc -n bank
-
Listando hpa (HorizontalPodAutoscaler)
kubectl get hpa -n bank
- Autenticação no azure (Precisamos instalar o (Azure CLI)
az login
- Obtendo credenciais do cluster AKS
az aks get-credentials --resource-group $RESOURCE_GROUP --name $NAME
- Instalando nginx (Nginx)
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.0/deploy/static/provider/cloud/deploy.yaml
- Instalando cert-manager (Cert-Manager)
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.3/cert-manager.yaml
- Instalando istio
istioctl install --set profile=default -y
- Habilitando no namespace
kubectl label namespace <namespace> istio-injection=enabled
- Habilitando Prometheus
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.11/samples/addons/prometheus.yaml istioctl dashboard prometheus
- Habilitando Grafana
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.11/samples/addons/grafana.yaml istioctl dashboard grafana
- Habilitando Kiali
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.11/samples/addons/kiali.yaml istioctl dashboard kiali
- Executando o teste de carga
artillery run -o artillery-report.json artillery.yaml