LoginSignup
1
2

More than 5 years have passed since last update.

docker edgeでkubernetesお試し

Last updated at Posted at 2018-06-10

docker edge for macでkubernetesお試し

$ wget https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
$ kubectl apply -f kubernetes-dashboard.yaml --record
$ kubectl proxy --address 0.0.0.0 --accept-hosts '.*' &
$ open http://localhost:8001/
  • komposeインストール
$ brew install kompose
  • docker-compose.yml変換
$ cat docker-compose.yml
version: '3'
services:
  app:
    image: nginx
    ports:
     - 8000:80

$ kompose convert
INFO Kubernetes file "app-service.yaml" created
INFO Kubernetes file "app-deployment.yaml" created
  • service.yamlのspecにtype追加
    • Ingress通すならNodePortになるのかも
$ vim 
+  type: LoadBalancer
  • kubernetesにデプロイ
$ kompose up
  • service起動
$ kubectl apply -f app-service.yaml --record
  • 疎通確認
$ kubectl describe svc app
$ open localhost:31874
1
2
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
2