add minikube installation guide && kompose converter tool

master
TBS093A 2023-03-20 10:51:55 +01:00
parent 0e86a2173d
commit 1deb7b5494
1 changed files with 54 additions and 0 deletions

View File

@ -53,5 +53,59 @@ you can clean docker objects separetly, but removing every objects are more comf
docker system prune --volumes docker system prune --volumes
``` ```
## Minikube installation
Alternatively you can install minikube and deploy all of docker-compose configurations via k8s
```bash
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
```
you can start it like that:
```bash
minikube start
```
after that you have to install kubectl separately or use it by minikube facade:
```bash
kubectl get po -A
# OR
minikube kubectl -- get po -A
```
more information: https://minikube.sigs.k8s.io/docs/start/
## Convert Docker-Compose Configs to Kubernetes Resources
you can install ```kompose``` for do that:
```bash
curl -L https://github.com/kubernetes/kompose/releases/download/v1.26.0/kompose-linux-amd64 -o kompose
chmod +x kompose
sudo mv ./kompose /usr/local/bin/kompose
```
go to particular service directory and execute this one:
```bash
kompose convert
```
after that execute this one:
```bash
kubectl apply -f <output file>
```
```<output file>``` means all of generated files separated by ```,``` like that for e.g.:
```bash
kubectl apply -f frontend-tcp-service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml
```
more information: https://kubernetes.io/docs/tasks/configure-pod-container/translate-compose-kubernetes/