Cluster | 一連のシステム。context切り替えで他のクラスター操作する |
Pod | |
Service | PodはどこのNodeに配置されるかわからないので、Service経由でアクセスする。向き先のPodを指定する |
Ingress | ALBみたいなもの。パスベースでServiceに振り分けたりできる。 |
https://qiita.com/advent-calendar/2018/k8s-dojo
sudo snap install kubectl --classic sudo snap install helm --classic
Pod 一覧 | kubectl get pod |
Service 一覧 | kubectl get service |
https://kubernetes.io/ja/docs/setup/learning-environment/minikube/
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo install minikube-linux-amd64 /usr/local/bin/minikube && rm minikube-linux-amd64
sudo usermod -aG docker $USER && newgrp docker minikube start
creating host: create: provisioning: Temporary Error: error getting ip during provisioning: IPs output should only be one line, got 2 lines
Docker 26へ上げたら解消
minikube delete minikube start --force --driver=docker
minikube status E0603 19:39:28.334130 101558 status.go:260] status error: host: state: unknown state "minikube": docker container inspect minikube --format={{.State.Status}}: exit status 1 stdout: stderr: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.45/containers/minikube/json": dial unix /var/run/docker.sock: connect: permission denied
sudo groupadd docker sudo usermod -aG docker $USER newgrp docker
https://kubernetes.io/ja/docs/tasks/access-application-cluster/ingress-minikube/
VM Hostに入る | minikube ssh |
ダッシュボード起動 | minikube dashboard |
Service 一覧 | kubectl get service |
URL取得 | minikube service サービス名 --url |
https://kubernetes.io/ja/docs/tasks/access-application-cluster/ingress-minikube/
kompose convert