i'm a newbie to k8s. I have a homework and this is my situation:
There is an app with microservice-oriented, build with amount ten containers. It had a docker-compose
file for easily set up. Now my mission is deploy it into Kubernetes. My idea: convert docker-compose
file to k8s manifest with kompose
, and create helm chart for each services.
My question is: I have to modify each chart one-by-one, isn't it? Is there any way to generate values.yaml
base on existing k8s manifest? example, from this:
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.22.0 (955b78124)
creationTimestamp: null
labels:
io.kompose.service: bookstore-account-service
name: bookstore-account-service
...
to this, automatically:
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: {{ .Values.cmd }}
kompose.version: {{ .Values.ver }}
creationTimestamp: null
labels:
io.kompose.service: {{ .Values.name }}
name: {{ .Values.name }}
...
# values.yaml
cmd: kompose convert
ver: 1.22.0 (955b78124)
name: bookstore-account-service
p/s: sorry for my bad English, it's not my first language :D