diff --git a/examples/breakfast.md b/examples/breakfast.md index a98fbb408..1c1670dc9 100644 --- a/examples/breakfast.md +++ b/examples/breakfast.md @@ -24,6 +24,8 @@ breakfast. This breakfast has coffee and pancakes: ``` cat <$DEMO_HOME/breakfast/base/kustomization.yaml +apiVersion: v1 +kind: Kustomization resources: - coffee.yaml - pancakes.yaml @@ -69,6 +71,8 @@ likes her coffee hot: mkdir -p $DEMO_HOME/breakfast/overlays/alice cat <$DEMO_HOME/breakfast/overlays/alice/kustomization.yaml +apiVersion: v1 +kind: Kustomization commonLabels: who: alice bases: @@ -92,6 +96,8 @@ And likewise a [variant] for Bob, who wants _five_ pancakes, with strawberries: mkdir -p $DEMO_HOME/breakfast/overlays/bob cat <$DEMO_HOME/breakfast/overlays/bob/kustomization.yaml +apiVersion: v1 +kind: Kustomization commonLabels: who: bob bases: diff --git a/examples/combineConfigs.md b/examples/combineConfigs.md index 86e46d34d..9abd56f2e 100644 --- a/examples/combineConfigs.md +++ b/examples/combineConfigs.md @@ -158,6 +158,8 @@ height=10m EOF cat <$DEMO_HOME/base/kustomization.yaml +apiVersion: v1 +kind: Kustomization configMapGenerator: - name: my-configmap files: @@ -191,6 +193,8 @@ dbpassword=mothersMaidenName EOF cat <$OVERLAYS/development/kustomization.yaml +apiVersion: v1 +kind: Kustomization bases: - ../../base namePrefix: dev- @@ -273,6 +277,8 @@ dbpassword=thisShouldProbablyBeInASecretInstead EOF cat <$OVERLAYS/production/kustomization.yaml +apiVersion: v1 +kind: Kustomization bases: - ../../base namePrefix: prod- diff --git a/examples/configGeneration.md b/examples/configGeneration.md index 7a3750ade..2bc8438a4 100644 --- a/examples/configGeneration.md +++ b/examples/configGeneration.md @@ -39,6 +39,8 @@ curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\ /{deployment,service}.yaml" cat <<'EOF' >$BASE/kustomization.yaml +apiVersion: v1 +kind: Kustomization commonLabels: app: hello resources: @@ -59,6 +61,8 @@ OVERLAYS=$DEMO_HOME/overlays mkdir -p $OVERLAYS/staging cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml +apiVersion: v1 +kind: Kustomization namePrefix: staging- nameSuffix: -v1 commonLabels: diff --git a/examples/generatorOptions.md b/examples/generatorOptions.md index a9fc3c3c0..d92ce7a3b 100644 --- a/examples/generatorOptions.md +++ b/examples/generatorOptions.md @@ -18,6 +18,8 @@ Create a kustomization and add a ConfigMap generator to it. ``` cat > $DEMO_HOME/kustomization.yaml << EOF +apiVersion: v1 +kind: Kustomization configMapGenerator: - name: my-configmap literals: diff --git a/examples/helloWorld/README.md b/examples/helloWorld/README.md index a812ad9a2..942a8d664 100644 --- a/examples/helloWorld/README.md +++ b/examples/helloWorld/README.md @@ -142,6 +142,8 @@ defining a new name prefix, and some different labels. ``` cat <<'EOF' >$OVERLAYS/staging/kustomization.yaml +apiVersion: v1 +kind: Kustomization namePrefix: staging- commonLabels: variant: staging @@ -183,6 +185,8 @@ with a different name prefix and labels. ``` cat <$OVERLAYS/production/kustomization.yaml +apiVersion: v1 +kind: Kustomization namePrefix: production- commonLabels: variant: production diff --git a/examples/imageTags.md b/examples/imageTags.md index d6a5fe11a..43a725b68 100644 --- a/examples/imageTags.md +++ b/examples/imageTags.md @@ -13,6 +13,8 @@ Make a `kustomization` containing a pod resource ``` cat <$DEMO_HOME/kustomization.yaml +apiVersion: v1 +kind: Kustomization resources: - pod.yaml EOF diff --git a/examples/jsonpatch.md b/examples/jsonpatch.md index 61c00f38f..e861464e5 100644 --- a/examples/jsonpatch.md +++ b/examples/jsonpatch.md @@ -11,6 +11,8 @@ Make a `kustomization` containing an ingress resource. DEMO_HOME=$(mktemp -d) cat <$DEMO_HOME/kustomization.yaml +apiVersion: v1 +kind: Kustomization resources: - ingress.yaml EOF diff --git a/examples/multibases/README.md b/examples/multibases/README.md index ae3d471a4..6a8567721 100644 --- a/examples/multibases/README.md +++ b/examples/multibases/README.md @@ -22,6 +22,8 @@ BASE=$DEMO_HOME/base mkdir $BASE cat <$BASE/kustomization.yaml +apiVersion: v1 +kind: Kustomization resources: - pod.yaml EOF @@ -47,6 +49,8 @@ DEV=$DEMO_HOME/dev mkdir $DEV cat <$DEV/kustomization.yaml +apiVersion: v1 +kind: Kustomization bases: - ./../base namePrefix: dev- @@ -60,6 +64,8 @@ STAG=$DEMO_HOME/staging mkdir $STAG cat <$STAG/kustomization.yaml +apiVersion: v1 +kind: Kustomization bases: - ./../base namePrefix: stag- @@ -73,6 +79,8 @@ PROD=$DEMO_HOME/production mkdir $PROD cat <$PROD/kustomization.yaml +apiVersion: v1 +kind: Kustomization bases: - ./../base namePrefix: prod- @@ -83,6 +91,8 @@ Then define a _Kustomization_ composing three variants together: ``` cat <$DEMO_HOME/kustomization.yaml +apiVersion: v1 +kind: Kustomization bases: - ./dev - ./staging diff --git a/examples/remoteBuild.md b/examples/remoteBuild.md index 747724fca..3800c856a 100644 --- a/examples/remoteBuild.md +++ b/examples/remoteBuild.md @@ -34,6 +34,8 @@ A base can also be specified as a URL: DEMO_HOME=$(mktemp -d) cat <$DEMO_HOME/kustomization.yaml +apiVersion: v1 +kind: Kustomization bases: - github.com/kubernetes-sigs/kustomize//examples/multibases?ref=v1.0.6 namePrefix: remote- diff --git a/examples/wordpress/README.md b/examples/wordpress/README.md index 2b7a86749..29fd290cb 100644 --- a/examples/wordpress/README.md +++ b/examples/wordpress/README.md @@ -49,6 +49,8 @@ Create a new kustomization with two bases: ``` cat <$DEMO_HOME/kustomization.yaml +apiVersion: v1 +kind: Kustomization bases: - wordpress - mysql