- Collection Postman (Debezium Connect)
https://www.getpostman.com/collections/5b52d47ffcc20aef0858
- Cadastrando conector para ouvir eventos do CDC
{ "name":"sql-server-connection", "config":{ "connector.class":"io.debezium.connector.sqlserver.SqlServerConnector", "database.hostname":"mssql", "database.port ":"1433", "database.user":"sa", "database.password":"@docker@2021", "database.dbname":"Transaction", "database.server.name":"transacion_server", "table.whitelist":"dbo.Transaction", "database.history":"io.debezium.relational.history.MemoryDatabaseHistory" } }
- Build da imagem
docker image build -t jailtonjunior/transactions_worker:v1 -f src/Transactions.Worker/Dockerfile . docker image build -t jailtonjunior/transactions_api:v1 -f src/Transactions.API/Dockerfile .
- Logando no docker
docker login
- Push da imagem criada
docker push jailtonjunior/transactions_worker:v1 docker push jailtonjunior/transactions_api:v1
- Verificando o contexto (cluster configurado)
kubectl config get-contexts
- Alterando o contexto (cluster). Se necessário.
kubectl config use-context (nome do contexto)
- Criando namespace
kubectl apply -f .\.k8s\namespaces\ -R
- Criando deployments
kubectl apply -f .\.k8s\deployments\ -R -n transactions
- Criando services
kubectl apply -f .\.k8s\services\ -R -n transactions
- Habilitando ingress-nginx no AKS (Azure)
https://kubernetes.github.io/ingress-nginx/deploy/#azure kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.3/deploy/static/provider/cloud/deploy.yaml
- Criando ingress AKS
kubectl apply -f .\.k8s\ingress\ -R -n transactions
- Autenticação no novo cluster
az aks get-credentials --resource-group transactions-rg --name transactions-aks