インストール
1 2 3 4 |
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb sudo dpkg -i minikube_latest_amd64.deb sudo service start docker minikube start |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
apiVersion: apps/v1 kind: Deployment metadata: name: nginx spec: selector: matchLabels: app: nginx replicas: 1 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80 |
ダッシュボード
1 |
minikube dashboard |
Nginxデプロイ
1 |
kubectl apply -f nginx.yaml |
1 2 3 |
⋊> /tmp kubectl get pod 20:56:53 NAME READY STATUS RESTARTS AGE nginx-585449566-bqr5v 1/1 Running 0 34s |
ポートフォワード
1 |
kubectl port-forward nginx-585449566-bqr5v 8080:80 |