This file contains 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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: hubble-ui | |
namespace: kube-system | |
--- | |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: hubble-ui |
This file contains 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
resources | |
| where type == "microsoft.containerservice/managedclusters" | |
| mv-expand agentpool=properties.agentPoolProfiles | |
| extend nodeVersion = tostring(agentpool.nodeImageVersion) | |
| where nodeVersion startswith "AKSUbuntu" | |
| extend nodePoolName = tostring(agentpool.name) | |
| project clusterName = name, tenantId, subscriptionId, nodePoolName, nodeVersion |
This file contains 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 k8s-extension create \ | |
--resource-group rg-aks-pixelland-weu \ | |
--cluster-name aks-pixelland-weu \ | |
--name flux \ | |
--extension-type microsoft.flux \ | |
--cluster-type managedClusters \ | |
--auto-upgrade-minor-version true \ | |
--config toleration-keys="CriticalAddonsOnly=true:NoSchedule" |
This file contains 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
AZURE_SUBSCRIPTION_ID=$(az account show --query "id" --output tsv) | |
AZURE_NODE_RESOURCE_GROUP=$(az aks show --resource-group ${AZURE_RESOURCE_GROUP} --name ${NAME} --query "nodeResourceGroup" --output tsv) | |
AZURE_SERVICE_PRINCIPAL=$(az ad sp create-for-rbac --scopes /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${AZURE_NODE_RESOURCE_GROUP} --role Contributor --output json --only-show-errors) | |
AZURE_TENANT_ID=$(echo ${AZURE_SERVICE_PRINCIPAL} | jq -r '.tenant') | |
AZURE_CLIENT_ID=$(echo ${AZURE_SERVICE_PRINCIPAL} | jq -r '.appId') | |
AZURE_CLIENT_SECRET=$(echo ${AZURE_SERVICE_PRINCIPAL} | jq -r '.password') | |
az aks get-credentials --resource-group rg-aks-byo-cni-dev --name aks-byo-cni-dev | |
helm install cilium cilium/cilium --version 1.11.3 \ |
This file contains 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
$command = $(helm uninstall me 2>&1) | |
if ($command -match 'error' ) { | |
write-host "error = $command" -ForegroundColor Red | |
} | |
$command = $(kubectl apply -f me.yaml 2>&1) |
This file contains 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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"final_space": true, | |
"console_title": true, | |
"console_title_style": "template", | |
"console_title_template": "{{if .Root}}root :: {{end}}{{.Shell}} :: {{.Folder}}", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", |
This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"name": { | |
"type": "string", | |
"metadata": { | |
"description": "AKS cluster name" | |
} | |
}, |
This file contains 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
$sp = New-AzADServicePrincipal -DisplayName RabbitMQScale | |
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($sp.Secret) | |
$UnsecureSecret = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR) | |
$AppID = (Get-AzADServicePrincipal -DisplayName RabbitMQScale).ApplicationID | |
New-AzRoleAssignment -ApplicationId $AppID -RoleDefinitionName "Contributor" | |
Write-host "Client ID =" $AppID | |
Write-host "Client Secret =" $UnsecureSecret | |
Write-host " Tenant =" (Get-AzContext).Tenant.Id |
This file contains 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
{ | |
"properties": { | |
"arguments": { | |
"properties": { | |
"x-dead-letter-exchange": { | |
"type": [ | |
"string", | |
"object", | |
"number", | |
"integer", |
This file contains 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
// Table of Servers with disk space is under nnGB | |
let setGBValue = 20; | |
// enter a GB value to check | |
let startDate = ago(30m); | |
// enter how many minutes to look back on | |
Perf | |
| where InstanceName != "D:" and InstanceName contains ":" | |
| where TimeGenerated > startDate | |
| where ObjectName == "LogicalDisk" and CounterName == "Free Megabytes" | |
| extend FreeSpaceGB = CounterValue/1024 |
NewerOlder