I installed Linkerd and Nginx on an AKS cluster. You will need an Azure subscription and deploy a basic cluster.
Install the Linkerd CLI: see https://linkerd.io/2.11/getting-started/#step-1-install-the-cli. You can also install the cli with brew:
import streamlit as st | |
import openai | |
import dotenv | |
from PIL import Image | |
from io import BytesIO | |
import os | |
import pickle | |
from collections import OrderedDict |
using Microsoft.Extensions.Logging; | |
using Microsoft.SemanticKernel; | |
using Microsoft.SemanticKernel.AI.ImageGeneration; | |
using System.Diagnostics; | |
using Microsoft.SemanticKernel.Planning; | |
using System.Text.Json; | |
var kernelSettings = KernelSettings.LoadSettings(); |
import requests | |
import json | |
# url uses a hardcoded identity endpoint | |
url = "http://127.0.0.1:40342/metadata/identity/oauth2/token?api-version=2019-11-01&resource=https%3A%2F%2Fvault> | |
headers = {"Metadata": "true"} | |
# do token request to IMDS, this will fail | |
r = requests.get(url, headers=headers) |
from azure.appconfiguration.provider import ( | |
AzureAppConfigurationProvider, | |
SettingSelector, | |
AzureAppConfigurationKeyVaultOptions | |
) | |
from azure.keyvault.secrets import SecretClient | |
from azure.identity import DefaultAzureCredential | |
def retrieve_secret(uri): | |
try: |
I installed Linkerd and Nginx on an AKS cluster. You will need an Azure subscription and deploy a basic cluster.
Install the Linkerd CLI: see https://linkerd.io/2.11/getting-started/#step-1-install-the-cli. You can also install the cli with brew:
All commands in the gist should be run from bash. You can use WSL (Windows Subsystem for Linux) to run the commands. You can also use the Azure Cloud Shell and select Bash instead of PowerShell.
Install Azure CLI (not needed in Azure Cloud Shell, CLI is pre-installed) and add the following Azure CLI extensions:
az extension add --name connectedk8s
resource vnet1 'Microsoft.Network/virtualNetworks@2020-11-01' = { | |
name: 'vnet1' | |
location: resourceGroup().location | |
properties: { | |
addressSpace: { | |
addressPrefixes: [ | |
'10.0.10.0/24' | |
] | |
} | |
subnets:[ |