WIP: Implement multi-port Services

This commit is contained in:
Tim Hockin
2015-03-13 08:16:41 -07:00
parent 9ed87612d0
commit 186818d787
70 changed files with 2118 additions and 815 deletions

View File

@@ -5,7 +5,8 @@ metadata:
name: cassandra
name: cassandra
spec:
targetPort: 9042
port: 9042
ports:
- port: 9042
targetPort: 9042
selector:
name: cassandra

View File

@@ -8,9 +8,13 @@
}
},
"spec":{
"port":3000,
"containerPort":"http-server",
"protocol":"TCP",
"ports": [
{
"port":3000,
"targetPort":"http-server",
"protocol":"TCP"
}
],
"selector":{
"name":"guestbook"
}

View File

@@ -9,9 +9,13 @@
}
},
"spec":{
"port":6379,
"containerPort":"redis-server",
"protocol":"TCP",
"ports": [
{
"port":6379,
"targetPort":"redis-server",
"protocol":"TCP"
}
],
"selector":{
"name":"redis",
"role":"master"

View File

@@ -9,9 +9,13 @@
}
},
"spec":{
"port":6379,
"containerPort":"redis-server",
"protocol":"TCP",
"ports": [
{
"port":6379,
"targetPort":"redis-server",
"protocol":"TCP"
}
],
"selector":{
"name":"redis",
"role":"slave"

View File

@@ -8,9 +8,13 @@
}
},
"spec":{
"port":80,
"containerPort":80,
"protocol":"TCP",
"ports": [
{
"port":80,
"targetPort":80,
"protocol":"TCP"
}
],
"selector":{
"name":"frontend"
}

View File

@@ -8,9 +8,13 @@
}
},
"spec":{
"port":6379,
"containerPort":6379,
"protocol":"TCP",
"ports": [
{
"port":6379,
"targetPort":6379,
"protocol":"TCP"
}
],
"selector":{
"name":"redis-master"
}

View File

@@ -8,9 +8,13 @@
}
},
"spec":{
"port":6379,
"containerPort":6379,
"protocol":"TCP",
"ports": [
{
"port":6379,
"targetPort":6379,
"protocol":"TCP"
}
],
"selector":{
"name":"redis-slave"
}

View File

@@ -5,7 +5,8 @@ metadata:
name: hazelcast
name: hazelcast
spec:
targetPort: 5701
port: 5701
ports:
- port: 5701
targetPort: 5701
selector:
name: hazelcast

View File

@@ -5,8 +5,9 @@ metadata:
name: mysql
name: mysql
spec:
targetPort: 3306
port: 3306
ports:
- port: 3306
targetPort: 3306
selector:
name: mysql

View File

@@ -5,8 +5,9 @@ metadata:
name: wpfrontend
name: wpfrontend
spec:
targetPort: 80
port: 80
ports:
- port: 80
targetPort: 80
selector:
name: wpfrontend

View File

@@ -6,7 +6,8 @@ metadata:
role: service
name: redis-sentinel
spec:
targetPort: 26379
port: 26379
ports:
- port: 26379
targetPort: 26379
selector:
redis-sentinel: "true"

View File

@@ -6,8 +6,9 @@ metadata:
name: rethinkdb-admin
namespace: rethinkdb
spec:
targetPort: 8080
port: 8080
ports:
- port: 8080
targetPort: 8080
selector:
db: rethinkdb
role: admin

View File

@@ -6,7 +6,8 @@ metadata:
name: rethinkdb-driver
namespace: rethinkdb
spec:
targetPort: 28015
port: 28015
ports:
- port: 28015
targetPort: 28015
selector:
db: rethinkdb

View File

@@ -3,16 +3,14 @@ kind: Service
metadata:
name: nginx-example
spec:
# the container on each pod to connect to, can be a name
# (e.g. 'www') or a number (e.g. 80)
targetPort: 80
# the port that this service should serve on
port: 8000
protocol: TCP
ports:
- port: 8000 # the port that this service should serve on
# the container on each pod to connect to, can be a name
# (e.g. 'www') or a number (e.g. 80)
targetPort: 80
protocol: TCP
# just like the selector in the replication controller,
# but this time it identifies the set of pods to load balance
# traffic to.
selector:
name: nginx