[stable/redis] Correct master host env value#19843
[stable/redis] Correct master host env value#19843WyriHaximus wants to merge 1 commit intohelm:masterfrom
Conversation
Signed-off-by: Cees-Jan Kiewiet <ceesjank@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: WyriHaximus The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @WyriHaximus. Thanks for your PR. I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/assign @desaintmartin |
|
Hi @WyriHaximus That's a resolvable hostname since we're using a "headless" service to add those entries in the DNS configuration. In other words, it creates a hostname that can be used to target a specific pod. Here you have an example: $ helm install stable/redis --name redis
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
...
redis-headless ClusterIP None <none> 6379/TCP 3m36s
redis-master ClusterIP 10.96.143.224 <none> 6379/TCP 3m36s
redis-slave ClusterIP 10.96.113.236 <none> 6379/TCP 3m36s
$ kg endpoints
NAME ENDPOINTS AGE
...
redis-headless 172.17.0.5:6379,172.17.0.6:6379,172.17.0.7:6379 3m41s
redis-master 172.17.0.5:6379 3m41s
redis-slave 172.17.0.6:6379,172.17.0.7:6379 3m41sAs you can see there are 3 services (one for master pods, one for slave pods, and there's a headless service). We can check that we can resolve every hostname: $ kubectl run --restart=Never -it busybox --image=busybox -- sh
/ # nslookup redis-master.default.svc.cluster.local
Server: 10.96.0.10
Address: 10.96.0.10:53
Name: redis-master.default.svc.cluster.local
Address: 10.96.143.224
...
/ # nslookup redis-master-0.redis-headless.default.svc.cluster.local
Server: 10.96.0.10
Address: 10.96.0.10:53
Name: redis-master-0.redis-headless.default.svc.cluster.local
Address: 172.17.0.5As you can see, |
|
/hold |
|
Hey @juan131, Thank you for your detailed response. When I started doing test runs on how to set up my personal kubernetes cluster this was one of the things I ran into using minikube. At the time installing it with Fast forward to yesterday I did some light reading on headless services and the idea excites me. But I assumed you could only do Now today after you commented I started doing some experiments. That helm install works on minikube kudo's for that 👍 . But it doesn't on digitalocean's hosted kubernetes, which I'm using for my cluster. Did a test on a fresh cluster to be sure. But the |
|
Did some more digging, it's for sure not the issue I thought that had to be fixed in this PR. The IP resolves but it can't connect for some reason. Will keep digging on why this is happening |
What this PR does / why we need it:
The
REDIS_MASTER_HOSTenv variable currently passed to slaves currently points to a non-existing service namelyredis-master-0.redis-headless.default.svc.local. Which is a mix of pod names and services that is never going to work. So this PR changes that toredis-master.default.svc.localtargeting the redis master service.Which issue this PR fixes
Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
[stable/mychartname])