Testing AKS EE with Sitecore workload.
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
.
- Taint the Windows node:
kubectl taint node "$(Get-AksEdgeNodeName -NodeType Windows)" os=windows:NoSchedule
- 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
, changespec.type
fromNodePort
toLoadBalancer
. - Verify that nginx got an external IP address:
kubectl get services -n ingress-nginx ingress-nginx-controller
- Install:
- 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...
- Run:
-
Create a new project directory:
mkdir .\sitecore-xm;cd .\sitecore-xm
-
Download workload:
curl.exe https://raw.githubusercontent.com/pbering/aksee-test/main/test/xm/kustomization.yaml -o .\kustomization.yaml
-
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"
-
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
-
Prepare Sitecore license, run:
Import-Module SitecoreDockerTools ConvertTo-CompressedBase64String -Path "C:\License\license.xml" | Out-File -Encoding ascii -NoNewline -FilePath .\sitecore-license.txt
-
Then deploy the workload:
kubectl create namespace xm kubectl apply -n xm -k .
-
You can observe the progress with
kubectl -n xm get pods
or https://k9scli.io/ or just wait withkubectl wait --for=condition=complete job mssql-init solr-init -n xm --timeout 10m
-
Done! Now you can visit https://cm.aksee.local.