「マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
目次 †
概要 †
2.0.0.2 から Docker Desktop for Windowsにリネーム
がサポートされるようになった。
- 2021/8/31発表、
- 2021/8/31から開始
- 2022/1/31までが猶予期間
詳細 †
有償化 †
回避 †
参考 †
機能 †
ローカルのDocker for WindowsでK8sが動作する。
動確 †
有効化と有効化の確認 †
>kubectl get componentstatuses
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
↓ ↓ ↓
>kubectl get componentstatuses
NAME STATUS MESSAGE ERROR
scheduler Healthy ok
controller-manager Healthy ok
etcd-0 Healthy {"health":"true"}
K8sダッシュボードをデプロイ †
※ このコマンド(プロキシ)は、実行状態のままにしておく。
- 初期設定手順がLinuxコマンドなのでWSLに移動する。
- 初めに、以下の手順で、WSLでkubectlを利用できるようにする。
- kubectlの実行確認
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:56:40Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:07:57Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
アプリケーションのデプロイ †
- 下記の参考サイトの情報から、
以下のようにdocker-compose.ymlを作成した。
- 実際に、スタックをデプロイしてみる。
>docker stack deploy --compose-file docker-compose.yml mystack
Ignoring unsupported options: build
service "web": build is ignored
service "words": build is ignored
service "db": build is ignored
Waiting for the stack to be stable and running...
words: Ready [pod status: 1/1 ready, 0/1 pending, 0/1 failed]
web: Ready [pod status: 1/1 ready, 0/1 pending, 0/1 failed]
db: Ready [pod status: 1/1 ready, 0/1 pending, 0/1 failed]
Stack mystack is stable and running
- 以下のアドレスにアクセスしてみるとアプリが起動する。
- 最後に、デプロイしたスタックを削除する。
docker stack rm mystack
- スタックをデプロイしてみる。
>docker stack deploy --compose-file docker-compose.yaml mystack
Ignoring unsupported options: build
Igninoring deprecated options:
container_name: Setting the container name is not supported.
service "azure-vote-back": container_name is deprecated
service "azure-vote-front": container_name is deprecated
service "azure-vote-front": build is ignored
Waiting for the stack to be stable and running...
azure-vote-back: Ready [pod status: 1/1 ready, 0/1 pending, 0/1 failed]
azure-vote-front: Ready [pod status: 1/1 ready, 0/1 pending, 0/1 failed]
Stack mystack is stable and running
※ build is ignored(docker build のセクションが無視されるの)で、
azure-vote-frontが、Pendingのままになることがあるので注意。
- デプロイしたスタックを削除する。
docker stack rm mystack
その他 †
コチラ
コチラ
参考 †
新規サポートの追加要素 †
K8s on Docker Desktop for Windows
docker.com †
Blog †
Docker Documentation †
Publickey †
CL LAB †
クリエーションライン株式会社 #docker
@IT †
Qiita †
- Docker for Windows で Kubernetes
開発基盤部会 Wiki †
Tags: :Windows, :Hyper-V, :仮想化, :コンテナ