mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-02 17:57:33 +00:00
Core support for ip-per-service
This commit is contained in:
@@ -85,7 +85,7 @@ redis-slave-controller gurpartap/redis name=redis,role=slave 2
|
||||
The redis slave configures itself by looking for the Kubernetes service environment variables in the container environment. In particular, the redis slave is started with the following command:
|
||||
|
||||
```shell
|
||||
redis-server --slaveof $SERVICE_HOST $REDIS_MASTER_SERVICE_PORT
|
||||
redis-server --slaveof $REDIS_MASTER_SERVICE_HOST $REDIS_MASTER_SERVICE_PORT
|
||||
```
|
||||
|
||||
Once that's up you can list the pods in the cluster, to verify that the master and slaves are running:
|
||||
|
@@ -71,7 +71,7 @@ func HandleError(result interface{}, err error) (r interface{}) {
|
||||
}
|
||||
|
||||
func main() {
|
||||
pool = simpleredis.NewConnectionPoolHost(os.Getenv("SERVICE_HOST") + ":" + os.Getenv("REDIS_MASTER_SERVICE_PORT"))
|
||||
pool = simpleredis.NewConnectionPoolHost(os.Getenv("REDIS_MASTER_SERVICE_HOST") + ":" + os.Getenv("REDIS_MASTER_SERVICE_PORT"))
|
||||
defer pool.Close()
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
Reference in New Issue
Block a user