LoginSignup
1
0

More than 1 year has passed since last update.

AKS Essentials ClusterをAzureに接続する方法

Last updated at Posted at 2023-05-04

はじめに

以前AKS Edge EssentialsをWindows11にインストールし、ブログにしました。今回はAzureから管理できるようにするためにAzureに接続します。

Azure PowerShell Modulesをインストールする

まずは準備。以下のコマンドで必要なAzure PowerShellモジュールをインストールします。

Install-Module Az.Resources -Repository PSGallery -Force -AllowClobber -ErrorAction Stop  
Install-Module Az.Accounts -Repository PSGallery -Force -AllowClobber -ErrorAction Stop 
Install-Module Az.ConnectedKubernetes -Repository PSGallery -Force -AllowClobber -ErrorAction Stop

サービスプリンシパルを作成する

リソースをAzure Arcにオンボードする際の認証に使うためのサービスプリンシパルを作成します。Microsoft.Kubernetes connected clusterの役割を指定します。
enrollazure.png

aksedge-config.jsonファイルを作成する

aksedge-config.jsonを出力します。

New-AksEdgeConfig -DeploymentType ScalableCluster -outFile .\aksedge-config.json | Out-Null

Arcの項目を入力します。各項目の説明はMicrosoftドキュメントを参照。
config.png

Azureに接続する

以下のコマンドで先ほど作成したコンフィグファイルを使ってAzureに接続します。

Connect-AksEdgeArc -JsonConfigFilePath C:\AKSEdgeE\aksedge-config.json

失敗しました。ガーン。
erroratregister.png

Microsoft.kubernetesが登録されてないと怒られていますね。Microsoftドキュメントに立ち返ってみると前提条件で必要なリソースプロバイダーを有効にするとありましたすみません。

必要なリソースプロバイダーを有効にする

Azureのサブスクリプションのページからリソースプロバイダーを有効にします。
resourceprovider.png

Azureに今度こそ接続する

今度こそAzureに接続します。無事にAzure Arcがオンボードされ、Azureから管理できるようになりました。
successregister.png
azureportal.png

まとめ

AKS Edge ClusterをAzureから管理できるようにしました。前提条件を見落としていて少し後戻りしましたが、本来はあまり詰まるポイントもなく簡単にAzureに接続できる印象です。

参考

Connect your AKS Edge Essentials cluster to Azure Arc

1
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
1
0