0

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}")

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .