HiveBrain v1.2.0
Get Started
← Back to all entries
patternkubernetesMinor

Angular config maps in kubernetes

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
kubernetesmapsconfigangular

Problem

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.

Solution

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.

Context

StackExchange DevOps Q#11380, answer score: 3

Revisions (0)

No revisions yet.