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 "---".
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 "---".
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