生成cosmosdb
az cosmosdb create
--name $NAME
--kind GlobalDocumentDB
--resource-group learn-rg01
az cosmosdb sql database create
--account-name $NAME
--name "Products"
--resource-group learn-rg01
az cosmosdb sql container create
--account-name $NAME
--database-name "Products"
--name "Clothing"
--partition-key-path "/productId"
--throughput 1000
--resource-group learn-rg01
生成aks
az aks create
--resource-group $RESOURCE_GROUP
--name $AKS_CLUSTER_NAME
--vm-set-type VirtualMachineScaleSets
--node-count 2
--load-balancer-sku standard
--location $REGION_NAME
--kubernetes-version $VERSION
--network-plugin azure
--vnet-subnet-id $SUBNET_ID
--service-cidr 10.2.0.0/24
--dns-service-ip 10.2.0.10
--docker-bridge-address 172.17.0.1/16
--generate-ssh-keys
helm install ratings bitnami/mongodb
--namespace ratingsapp
--set auth.username=user01,auth.password=password01,auth.database=ratingsdb
ratings-mongodb.ratingsapp.svc.cluster.local
kubectl create secret generic mongosecret
--namespace ratingsapp
--from-literal=MONGOCONNECTION="mongodb://user01:password01@ratings-mongodb.ratingsapp:27017/ratingsdb"
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx-ingress-ingress-nginx-controller LoadBalancer 10.2.0.227 40.64.96.214 80:31085/TCP,443:31977/TCP 8m10s
nginx-ingress-ingress-nginx-controller-admission ClusterIP 10.2.0.202