Last active
July 9, 2024 18:45
-
-
Save sixeyed/15f25dbbd6454f665fba58fde11299f9 to your computer and use it in GitHub Desktop.
Snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az aks nodepool add -g $rgName --cluster-name $aksName ` | |
-n $nodePoolName ` | |
--mode User ` | |
--enable-cluster-autoscaler ` | |
--node-count 1 ` | |
--min-count 0 ` | |
--max-count $nodeMaxCount ` | |
--node-osdisk-size $aksNodeDiskSize ` | |
--node-vm-size $nodeVmSize ` | |
--vnet-subnet-id $subnetId ` | |
--zones $zones ` | |
--labels app-role=$role app-environment=$environmentValue ` | |
--node-taints "app-role=$($role):NoSchedule,app-environment=$($environmentValue):NoSchedule" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az aks create --resource-group istio-test ` | |
--location eastus ` | |
--name istio-test ` | |
--kubernetes-version 1.29.4 ` | |
--enable-azure-service-mesh ` | |
--node-count 2 ` | |
--node-vm-size Standard_D2pls_v5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$aks=az aks show -g $rgName -n $aksName | ConvertFrom-Json | |
$myIp=curl -sSL ifconfig.me | |
$allowedIps = $aks.apiServerAccessProfile.authorizedIpRanges + $myIp | |
az aks update -g $rgName -n $aksName --api-server-authorized-ip-ranges $(${allowedIps} -join ',') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$aks=az aks show -g $rgName -n $aksName | ConvertFrom-Json | |
$myIp=curl -sSL ifconfig.me | |
$allowedIps = $aks.apiServerAccessProfile.authorizedIpRanges | where {-not $_.StartsWith($myIp)} | |
az aks update -g $rgName -n $aksName --api-server-authorized-ip-ranges $(${allowedIps} -join ',') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az aks wait -g $rgName -n $aksName --updated --timeout 1800 | |
az aks wait -g $rgName -n $aksName --custom "powerState.code=='Running'" --timeout 1800 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$versionedSecretId = $(az keyvault certificate show -n $tlsCertName --vault-name $keyVaultName --query "sid" -o tsv) | |
$unversionedSecretId = $versionedSecretId.Substring(0, $versionedSecretId.LastIndexOf('/')) | |
az network application-gateway ssl-cert create --gateway-name $appgwName -g $rgName -n $tlsCertName --key-vault-secret-id $unversionedSecretId |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$info = docker version -f json | ConvertFrom-Json | |
$env:DOCKER_BUILD_OS = $info.Server.Os.ToLower() | |
$env:DOCKER_BUILD_CPU = $info.Server.Arch.ToLower() | |
docker compose ` | |
-f docker-compose.yml ` | |
-f docker-compose-build-tags.yml ` | |
build | |
# in build-tags.yaml: | |
# image: sixeyed/app:1.0-${DOCKER_BUILD_OS}-${DOCKER_BUILD_CPU} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM build AS pkg | |
ARG VERSION_NUMBER=0.1 | |
ARG BUILD_COUNTER=0 | |
RUN dotnet publish -c Release -o /out /property:Version=${VERSION_NUMBER}.${BUILD_COUNTER}.0 App.csproj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment