「しくみがわかるKubernetes」に沿って進める
AzureContainerRegistry(以下「ACR」)にビルドする。
セットアップ
$ brew update && brew install azure-cli
$ az login
$ az provider register -n Microsoft.Network
$ az provider register -n Microsoft.Storage
$ az provider register -n Microsoft.Compute
$ az provider register -n Microsoft.ContainerService
$ brew install kubernetes-cli
リソースグループの作成とレジストリへのビルド
$ az group create --resource-group test --location japaneast
$ az acr build --registry testr --image kusakari:v1.0 src/
The resource with name 'testr' and type 'Microsoft.ContainerRegistry/registries' could not be found in subscription '無料試用版 (XXXXX)'.
無料のサブスクリプションでは、ビルド不可?
サブスクリプションを従量課金に更新して、続行する。
レジストリへのビルドと結果確認
$ az acr build --registry testr --image kusakari:v1.0 src/
$ az acr repository show-tags -n testr --repository kusakari
[
"v1.0"
]
いけました。