kelseyhightower / kubernetes-redis-cluster

Kubernetes Redis Cluster configs and tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hard coded clusterIP in service definition

yahavb opened this issue · comments

I see hard-coded clusterIP values e.g. clusterIP: "10.131.242.1"
I tried to assign clusterIP based on the pods ip kubectl get pods -o wide
But service create fails
Error from server: error when creating "services/redis-1.yaml": Service "redis-1" is invalid: spec.clusterIP: Invalid value: "10.0.1.4": provided IP is not in the valid range...

I also tried to use CLUSTER-IP from kubectl get svc -o wide
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
kubernetes 10.3.240.1 443/TCP 46m
redis 10.3.246.70 6379/TCP,16379/TCP 43m app=redis

but that also fails as invalid.

What will be a good clusterIP to define in the instance service?