Azure Kubernetes Services Edge Essentials test

Testing AKS EE with Sitecore workload.

Install AKS EE and deploy mixed Linux/Windows cluster on a single machine

Get and prepare downloads:

Start-BitsTransfer "https://aka.ms/aks-edge/k8s-msi" -Destination "~\Downloads\k8s.msi"
Start-BitsTransfer "https://aka.ms/aks-edge/windows-node-zip" -Destination "~\Downloads\windows-node.zip"
Expand-Archive -Path "~\Downloads\windows-node.zip" -DestinationPath "~\Downloads"

Then start installation with:

msiexec.exe /i (Get-Item "~\Downloads\k8s.msi").FullName /passiv ADDLOCAL=CoreFeature,WindowsNodeFeature

...or if you want the VM disks on another drive (see docs for all arguments):

msiexec.exe /i (Get-Item "~\Downloads\k8s.msi").FullName /passiv ADDLOCAL=CoreFeature,WindowsNodeFeature VHDXDIR=D:\Data\AksEdge

Now verify you the installation was successful:

Import-Module AksEdge
Get-Command -Module AKSEdge | Format-Table Name, Version

IMPORTANT! Before starting the cluster deployment, please notice that the following command will overwrite your current kubeconfig at $HOME/.kube/config, so make sure to backup if needed!

Now you can deploy a new cluster (takes about ~6 minutes):

New-AksEdgeDeployment -JsonConfigFilePath ".\single-mixed.json"

You now have a running Kuberneters single machine cluster with a Linux node and Windows node! You can verify with kubectl get node.

Post deployment steps

  1. Taint the Windows node: kubectl taint node "$(Get-AksEdgeNodeName -NodeType Windows)" os=windows:NoSchedule
  2. Install nginx ingress:
    • Install: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.0/deploy/static/provider/baremetal/deploy.yaml
    • Configure nginx with: kubectl edit svc ingress-nginx-controller -n ingress-nginx, change spec.type from NodePort to LoadBalancer.
    • Verify that nginx got an external IP address: kubectl get services -n ingress-nginx ingress-nginx-controller
  3. Install local path provisioner for Linux container persistence:
    • Run: kubectl apply -f https://raw.githubusercontent.com/Azure/AKS-Edge/main/samples/storage/local-path-provisioner/local-path-storage.yaml
    • For details, see docs...

Deploy Sitecore XM

  1. Create a new project directory: mkdir .\sitecore-xm;cd .\sitecore-xm

  2. Download workload: curl.exe https://raw.githubusercontent.com/pbering/aksee-test/main/test/xm/kustomization.yaml -o .\kustomization.yaml

  3. Generate certificates (download mkcert https://github.com/FiloSottile/mkcert/releases):

    mkcert -install
    mkcert -cert-file ".\cm-tls.crt" -key-file ".\cm-tls.key" "cm.aksee.local"
    mkcert -cert-file ".\id-tls.crt" -key-file ".\id-tls.key" "id.aksee.local"
  4. Prepare HOST file, run kubectl get services -n ingress-nginx ingress-nginx-controller and use the external IP to add two new entries:

    • 192.168.1.4 id.aksee.local
    • 192.168.1.4 cm.aksee.local
  5. Prepare Sitecore license, run:

    Import-Module SitecoreDockerTools
    ConvertTo-CompressedBase64String -Path "C:\License\license.xml" | Out-File -Encoding ascii -NoNewline -FilePath .\sitecore-license.txt
  6. Then deploy the workload:

    kubectl create namespace xm
    kubectl apply -n xm -k .
  7. You can observe the progress with kubectl -n xm get pods or https://k9scli.io/ or just wait with kubectl wait --for=condition=complete job mssql-init solr-init -n xm --timeout 10m

  8. Done! Now you can visit https://cm.aksee.local.