Score:0

Which host of redis in config, if running in the same k8 cluster?

cn flag

I am running a redis cluster helm install -n redis staging bitnami/redis-cluster in my k8s cluster and want to use this with a self hosted gitlab. In the docs I see I have to set

redis:
  install: false
global:
  redis:
    host: ???
    password: enabled
    key: secret
    secret: staging-redis-secret

My question is which host do I have to set, because everything is running in the same k8s cluster. Do I have to set the local IP like 10.42.0.4. And if yes, the IP of which redis container as I am running 6 of them.

With that config I can run

helm install \
    gitlab gitlab/gitlab \
    --namespace gitlab \
    --version 5.2.3 \
    -f config.yaml

The secret is set by

kubectl create secret generic staging-redis-secret --from-literal=secret=$(kubectl get secret --namespace "redis" staging-redis-cluster -o jsonpath="{.data.redis-password}")
Score:0
lr flag

Kubernetes runs an internal DNS server called CoreDNS. This should take care of all kind of internal name resolution between pods/services. You should never really hardcode any static IP into a configuration file, as this IP might no longer exists next time you reboot the whole cluster.

Start using domain names for everything and stick to that.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.