Create two svc if loadbalancer and use udp/tcp the same time
This commit is contained in:
+2
@@ -18,6 +18,8 @@ services:
|
||||
|
||||
redis:
|
||||
image: redis:3.0
|
||||
labels:
|
||||
kompose.service.type: loadbalancer
|
||||
ports:
|
||||
- "6379/tcp"
|
||||
- "1234:1235/udp"
|
||||
|
||||
+34
-5
@@ -44,10 +44,13 @@
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"name": "redis-tcp",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
"io.kompose.service": "redis-tcp"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
@@ -56,7 +59,32 @@
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
},
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis-tcp"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-udp",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-udp"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "1234",
|
||||
"protocol": "UDP",
|
||||
@@ -65,8 +93,9 @@
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
"io.kompose.service": "redis-udp"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
|
||||
+34
-5
@@ -44,10 +44,13 @@
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"name": "redis-tcp",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
"io.kompose.service": "redis-tcp"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
@@ -56,7 +59,32 @@
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
},
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis-tcp"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-udp",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-udp"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "1234",
|
||||
"protocol": "UDP",
|
||||
@@ -65,8 +93,9 @@
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
"io.kompose.service": "redis-udp"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
|
||||
Reference in New Issue
Block a user