As mentioned above, I want to merge multiple deployment yaml files in k8s into one yaml file, but because of the project, I can't use the separator "---".
Asked
Active
Viewed 2,443 times
1 Answers
2
You can use a list:
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm1
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm2
$ kubectl apply -f list.yaml
configmap/cm1 created
configmap/cm2 created

Ghokun
- 3,345
- 3
- 26
- 30