mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 04:03:20 +00:00
WIP: Implement multi-port Services
This commit is contained in:
@@ -5,7 +5,8 @@ metadata:
|
||||
name: cassandra
|
||||
name: cassandra
|
||||
spec:
|
||||
targetPort: 9042
|
||||
port: 9042
|
||||
ports:
|
||||
- port: 9042
|
||||
targetPort: 9042
|
||||
selector:
|
||||
name: cassandra
|
||||
|
@@ -8,9 +8,13 @@
|
||||
}
|
||||
},
|
||||
"spec":{
|
||||
"port":3000,
|
||||
"containerPort":"http-server",
|
||||
"protocol":"TCP",
|
||||
"ports": [
|
||||
{
|
||||
"port":3000,
|
||||
"targetPort":"http-server",
|
||||
"protocol":"TCP"
|
||||
}
|
||||
],
|
||||
"selector":{
|
||||
"name":"guestbook"
|
||||
}
|
||||
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -8,9 +8,13 @@
|
||||
}
|
||||
},
|
||||
"spec":{
|
||||
"port":80,
|
||||
"containerPort":80,
|
||||
"protocol":"TCP",
|
||||
"ports": [
|
||||
{
|
||||
"port":80,
|
||||
"targetPort":80,
|
||||
"protocol":"TCP"
|
||||
}
|
||||
],
|
||||
"selector":{
|
||||
"name":"frontend"
|
||||
}
|
||||
|
@@ -8,9 +8,13 @@
|
||||
}
|
||||
},
|
||||
"spec":{
|
||||
"port":6379,
|
||||
"containerPort":6379,
|
||||
"protocol":"TCP",
|
||||
"ports": [
|
||||
{
|
||||
"port":6379,
|
||||
"targetPort":6379,
|
||||
"protocol":"TCP"
|
||||
}
|
||||
],
|
||||
"selector":{
|
||||
"name":"redis-master"
|
||||
}
|
||||
|
@@ -8,9 +8,13 @@
|
||||
}
|
||||
},
|
||||
"spec":{
|
||||
"port":6379,
|
||||
"containerPort":6379,
|
||||
"protocol":"TCP",
|
||||
"ports": [
|
||||
{
|
||||
"port":6379,
|
||||
"targetPort":6379,
|
||||
"protocol":"TCP"
|
||||
}
|
||||
],
|
||||
"selector":{
|
||||
"name":"redis-slave"
|
||||
}
|
||||
|
@@ -5,7 +5,8 @@ metadata:
|
||||
name: hazelcast
|
||||
name: hazelcast
|
||||
spec:
|
||||
targetPort: 5701
|
||||
port: 5701
|
||||
ports:
|
||||
- port: 5701
|
||||
targetPort: 5701
|
||||
selector:
|
||||
name: hazelcast
|
||||
|
@@ -5,8 +5,9 @@ metadata:
|
||||
name: mysql
|
||||
name: mysql
|
||||
spec:
|
||||
targetPort: 3306
|
||||
port: 3306
|
||||
ports:
|
||||
- port: 3306
|
||||
targetPort: 3306
|
||||
selector:
|
||||
name: mysql
|
||||
|
||||
|
@@ -5,8 +5,9 @@ metadata:
|
||||
name: wpfrontend
|
||||
name: wpfrontend
|
||||
spec:
|
||||
targetPort: 80
|
||||
port: 80
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
name: wpfrontend
|
||||
|
||||
|
@@ -6,7 +6,8 @@ metadata:
|
||||
role: service
|
||||
name: redis-sentinel
|
||||
spec:
|
||||
targetPort: 26379
|
||||
port: 26379
|
||||
ports:
|
||||
- port: 26379
|
||||
targetPort: 26379
|
||||
selector:
|
||||
redis-sentinel: "true"
|
||||
|
@@ -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
|
||||
|
@@ -6,7 +6,8 @@ metadata:
|
||||
name: rethinkdb-driver
|
||||
namespace: rethinkdb
|
||||
spec:
|
||||
targetPort: 28015
|
||||
port: 28015
|
||||
ports:
|
||||
- port: 28015
|
||||
targetPort: 28015
|
||||
selector:
|
||||
db: rethinkdb
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user