3

I have a very simple kustomization.yaml:

configMapGenerator:
  - name: icecast-conifg
    files:
      - icecast.xml

When I run kubectl kustomize . it spits out a generated configMap properly, but how do I actually load it into my cluster? I'm missing some fundamental step.

Jonas
  • 121,568
  • 97
  • 310
  • 388
user3056541
  • 75
  • 1
  • 5

2 Answers2

4

With Kustomize you can use the -k (or --kustomize) flag instead of -f when using kubectl apply. Example:

kubectl apply -k <my-folder-or-file>

See Declarative Management of Kubernetes Objects Using Kustomize

Jonas
  • 121,568
  • 97
  • 310
  • 388
2

You could do for example

kubectl kustomize . | kubectl apply -f -
Henry
  • 42,982
  • 7
  • 68
  • 84