Skip to content

zeqk/aks-citools

Repository files navigation

This project is to test the use of kubernetes in an AKS (Azure Kubernetes Service)

Config

Set kube.config

az account set --subscription "$(az account list --query "[?name == \`Sistemas - Non Production\`].id" -o tsv)"
az aks get-credentials --resource-group rg-sandbox --name aks-citools-sbx-ue

Set context

kubectl config view
kubectl config current-context
kubectl config set-context --current --namespace=default
kubectl config view --minify | grep namespace:

Cluster Management

Stop

./stop-aks-if-running.sh rg-sandbox aks-citools-sbx-ue

az aks stop \
		--resource-group "rg-sandbox" \
		--name "aks-citools-sbx-ue" \
		--no-wait

Start

az aks start \
	--resource-group "rg-sandbox" \
	--name "aks-citools-sbx-ue" --no-wait

Get status

az aks show \
	--resource-group "rg-sandbox" \
	--name "aks-citools-sbx-ue" \
	--query "powerState.code" -o tsv

Other commands

DB

# Get status
az postgres flexible-server show --resource-group "rg-sandbox" --name "psql-wa01-sbx-ue" --query "state"
# Stop
az postgres flexible-server stop --resource-group "rg-sandbox" --name "psql-wa01-sbx-ue"
# Start
az postgres flexible-server start --resource-group "rg-sandbox" --name "psql-wa01-sbx-ue"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages