Help us understand the problem. What is going on with this article?

Windows10でminikubeを使う

環境

  • Windows10 Pro(Homeでもいけるはず)
  • VirtualBox

Virtulal BoxとHyper-Vは排他で一方が有効だともう一方は使えなくなるような動きをするので注意

手順

環境変数を通す

image.png

kubectlコマンドダウンロード

mkdir C:\tools\kubectl
Invoke-WebRequest -Uri  https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/windows/amd64/kubectl.exe -OutFile kubectl.exe

minikubeコマンドダウンロード

mkdir C:\tools\minikube
Invoke-WebRequest -Uri https://storage.googleapis.com/minikube/releases/latest/minikube-windows-amd64.exe -OutFile C:\tools\minikube\minikube.exe

起動

minikube start

クラスタ情報

kubectl cluster-info

サンプルアプリケーションのデプロイ

サンプルのDockerイメージをデプロイ

kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080

Dokcerイメージと接続するためのサービスをデプロイ

kubectl expose deployment hello-minikube --type=NodePort

Podがデプロイされているか確認

kubectl get pod

接続確認

minikube service hello-minikube

ブラウザでこのような画面が開く
image.png

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away