💰 .NET 5.0, Sql Server, Docker, Azure Pipeline, ACR and AKS
CREATE DATABASE [FinanceDB]
GO
USE [FinanceDB]
GO
SET
ANSI_NULLS ON
GO
SET
QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Finance](
[ID] [uniqueidentifier] NOT NULL,
[Title] [varchar](150) NOT NULL,
[Value] [decimal](18, 2) NOT NULL,
[Type] [varchar](30) NOT NULL,
[CreatedAt] [datetime2](7) NOT NULL
) ON [PRIMARY]
GO
az login
az aks get-credentials --resource-group $RESOURCE_GROUP --name $NAME
aws sts get-caller-identity
aws eks --region <REGION> update-kubeconfig --name <NOME_CLUSTER>
kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> \
--namespace=finance
Criando Secret ECR
kubectl create secret docker-registry regcred --docker-server=<your-accountid>.dkr.ecr.<region>.amazonaws.com --docker-username=AWS --docker-password=$(aws ecr get-login-password) --namespace=finance
Aplicando manifestos
kubectl apply -f .\.k8s\namespaces\ -R
kubectl apply -f .\.k8s\deployments\ -R -n finance
kubectl apply -f .\.k8s\services\ -R -n finance
Alterar entre contextos (clusters)
kubectl config get-contexts
kubectl config use-context <context>
kubectl config view --raw
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
helm repo list
https://artifacthub.io/
helm install prometheus prometheus-community/prometheus -n monitoring
helm install grafana grafana/grafana -n monitoring