0

Can anyone provide me a sample yaml to integrate connection strings for azure cache for redis in one of the pod container to deploy in aks cluster?

  • Will your redis-cache be deployed before the AKS ? or will both be deployed simultaneously? – vishal May 22 '20 at 13:38
  • Do you want to deploy redis in AKS or wants to connect to redis hosted in azure cache service? – Atul May 26 '20 at 11:26

1 Answers1

0

The easiest way to provide external configuration in a POD running in Kubernetes is to use ConfigMaps

https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#create-configmaps-from-literal-values

This will allow you to create a configuration file that can be injected to your PODs a runtime.

From this ConfigMAp you will then inject the value using either an ENV VAR or a file mount.

Here's an example on how to inject the ConfigMap value using an ENV VAR

https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#define-container-environment-variables-using-configmap-data

if you are interested in have your ConfigMap content loaded as a volume such that your pod can read its configuration from a File, have a look at how to mount the ConfigMap

https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume

As far as the Azure Redis Cache Connection String goes, you will find the connectiongString on the Access Key tab

enter image description here

djsly
  • 1,522
  • 11
  • 13