0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

AKS Edge EssentialsをWindows11にインストールしてみる

Posted at

前段

Windows 11, Windows 11 IoTにKubernetesをインストールする方法の第二弾です。AKS Edge EssentialsをWindows11にインストールしてみます。
この記事はInstall Kubernetes on Windows 10 and Windows 11 with AKS Edge Essentialsを参考にしました。

要件

4/18/2023時点だと以下のように記されています。最新情報はMicrosoftドキュメントから確認してください

Specs Local cluster
Host OS Windows 10/11 IoT Enterprise/Enterprise/Pro and Windows Server 2019, 2022
Total physical memory 4 GB with at least 2.5 GB free
CPU 2 vCPUs, clock speed at least 1.8 GHz
Disk Space At least 14 GB free

手順

  1. AKS Edge Essentialsのインストール
    早速インストールを進めていきます。K8s、K3sお好みのインストーラをダウンロードします。作業しやすくするためにC:\AKSEdgeEフォルダを作成しそこで作業していきます。
# Create Folder 
mkdir C:\AKSEdgeE

# K8s installer
$urlK8sMSI = "https://aka.ms/aks-edge/k8s-msi"
$path = "C:\AKSEdgeE\k8s.msi"
Start-BitsTransfer -Source $urlK8sMSI -Destination $path

Windows Containerを扱えるようにしておくためにWindows Node Filesもダウンロードしておきます。

#Windows Node Files
$urlWindowsFiles = "https://aka.ms/aks-edge/windows-node-zip"
$path = "C:\AKSEdgeE\windowsNodeFiles.zip"
Start-BitsTransfer -Source $urlWindowsFiles -Destination $path

また、AKS Edge Essential Toolsもダウンロードしておきます。

# Download and expand AKS Edge Essential Tools
$urlTools = "https://github.com/Azure/AKS-Edge/archive/refs/heads/main.zip"
$path = "C:\AKSEdgeE"
Start-BitsTransfer -Source $urlTools -Destination $path
Expand-Archive -Path $path\main.zip -DestinationPath $path\main

インストールを実行します。Windows Node Filesはあらかじめ展開し、K8sのインストーラと同じフォルダに入れておきます。

msiexec.exe /i C:\AKSEdgeE\k8s.msi ADDLOCAL=CoreFeature,WindowsNodeFeature INSTALLDIR=C:\Programs\AksEdge VHDXDIR=C:\vhdx

AKSEdge PowerShellモジュールが使えるようことを確認します。

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

2. AKS Edge Host Featureを追加

Install-AksEdgeHostFeatures

ちなみにもし仮想環境で検証される場合はNested-Vierualizationが必要です。

3. AKS Edge EssentialsのKubernetes Clusterをデプロイ
構成ファイルを作成します。今回は単体マシン上にKubernetes Clusterを展開します。

# Create AKS Edge Config File
New-AksEdgeConfig -DeploymentType SingleMachineCluster -outFile C:\AKSEdgeE\aksedge-config.json | Out-Null

構成ファイルの情報を基にAKS Edge Essentialsをデプロイします。必要に応じて構成ファイルは編集してください。参考

New-AksEdgeDeployment -JsonConfigFilePath C:\AKSEdgeE\aksedge-config.json

※メモリサイズを最小にしていたら4596MB以上の空きメモリが必要だと怒られました。余裕を持って作成することが重要ですね。。。

5分くらいでデプロイが完了しました!

まとめ

今回はAKS Edge Essentialのインストールまでをまとめました。なによりすごく手軽に導入できてしまうところが魅力ですね。次回はサンプルアプリケーションを動かしてみようと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?