|
|
# Installation
|
|
|
|
|
|
System required:
|
|
|
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
|
|
|
- [minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/)
|
|
|
|
|
|
## Arsitektur
|
|
|
|
|
|
- Deployment
|
|
|
|
|
|

|
|
|
|
|
|
## Setup minikube
|
|
|
|
|
|
Kubernate on local, mengunakan minikube. pertama kita harus buat dulu vm untuk minikubenya dengan spec seperti berikut:
|
|
|
|
|
|
```bash
|
|
|
minikube --memory 4096 --cpus 2 --insecure-registry tabeldata.ip-dynamic.com:8087 start
|
|
|
```
|
|
|
|
|
|
Penjelasan
|
|
|
|
|
|
- `memory`, ramnya disarankan lebih besar dari 4gb
|
|
|
- `cpus`, cpu core disarankan lebih besar dari 2
|
|
|
- `insecure-registry`, docker private registry yang kita gunakan adalah `tabeldata.ip-dynamic.com:8087`
|
|
|
|
|
|
Berikut hasilnya:
|
|
|
|
|
|
```bash
|
|
|
😄 minikube v1.0.0 on darwin (amd64)
|
|
|
🤹 Downloading Kubernetes v1.14.0 images in the background ...
|
|
|
🔥 Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
|
|
|
📶 "minikube" IP address is 192.168.99.127
|
|
|
🐳 Configuring Docker as the container runtime ...
|
|
|
🐳 Version of container runtime is 18.06.2-ce
|
|
|
⌛ Waiting for image downloads to complete ...
|
|
|
✨ Preparing Kubernetes environment ...
|
|
|
🚜 Pulling images required by Kubernetes v1.14.0 ...
|
|
|
🚀 Launching Kubernetes v1.14.0 using kubeadm ...
|
|
|
⌛ Waiting for pods: apiserver proxy etcd scheduler controller dns
|
|
|
🔑 Configuring cluster permissions ...
|
|
|
🤔 Verifying component health .....
|
|
|
💗 kubectl is now configured to use "minikube"
|
|
|
🏄 Done! Thank you for using minikube!
|
|
|
```
|
|
|
|
|
|
## Springboot running into pods
|
|
|
|
|
|
```bash
|
|
|
## apply pods and services
|
|
|
kubectl apply -f kubernetes/kubernetes.postgres-service.yaml
|
|
|
kubectl apply -f kubernetes/kubernetes.auth-service.yaml
|
|
|
``` |
|
|
\ No newline at end of file |