LoginSignup
0

More than 5 years have passed since last update.

KubernetesのTutorial

Last updated at Posted at 2017-08-16

Mac Pcを使います。Minikubeのインストール

minikubeをinstallして、一連の動作を確認

bash
brew cask install minikube
bash
minikube start
bash
kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
deployment "hello-minikube" created
bash
kubectl expose deployment hello-minikube --type=NodePort
service "hello-minikube" exposed
bash
kubectl get pod
NAME                             READY     STATUS              RESTARTS   AGE
hello-minikube-180744149-dm5rp   0/1       ContainerCreating   0          14s
bash
curl $(minikube service hello-minikube --url)
CLIENT VALUES:
client_address=172.17.0.1
command=GET
real path=/
query=nil
request_version=1.1
request_uri=http://192.168.99.100:8080/

SERVER VALUES:
server_version=nginx: 1.10.0 - lua: 10001

HEADERS RECEIVED:
accept=*/*
host=192.168.99.100:32530
user-agent=curl/7.43.0
BODY:
-no body in request-%  
bash
minikube stop
Stopping local Kubernetes cluster...
Machine stopped.

dashboardにアクセスする

bash
minikube dashboard

スクリーンショット 2017-08-16 18.59.39.png

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