5

How can I integrate a config map into my angular application in kubernetes?

Any useful blogs or videos implementing this would be helpful. I found a few, but they didn't work for me.

John Humphreys
  • 1,570
  • 7
  • 18
Madan
  • 111
  • 1
  • 2
  • 5

1 Answers1

4

This one from medium should be fine for your purposes: https://medium.com/@ychetankumarsarma/how-to-manage-angular-application-configurations-for-different-environments-with-docker-and-8ff8c55a1c7d.

It is good because:

  • It shows a test / development scenario.
  • It notes that it is a good / accepted technique to use environment variables to drive config.
  • It shows you how to create a config map with a literal value (as an example).
  • It shows you how to read that environment variable into your app environment properly.

There is also a working sample app noted here -> https://github.com/chetanku/frontend-env which you should be able to "just start up" and work backwards from.

John Humphreys
  • 1,570
  • 7
  • 18