Support port expose (#1227)
This commit is contained in:
+46
@@ -3,6 +3,44 @@
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "server",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "server"
|
||||
},
|
||||
"annotations": {
|
||||
"complexlabel": "override",
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%",
|
||||
"simplelabel.first": "Foo",
|
||||
"simplelabel.second": "Bar"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "server"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "apps/v1",
|
||||
"kind": "Deployment",
|
||||
@@ -64,6 +102,14 @@
|
||||
"image": "test",
|
||||
"imagePullPolicy": "",
|
||||
"name": "test-server",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 3000
|
||||
},
|
||||
{
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
|
||||
@@ -6,14 +6,19 @@ services:
|
||||
ports:
|
||||
- "5000:5000/tcp"
|
||||
- "5001:5000/tcp"
|
||||
# this may not be the correct usage in docker-compose
|
||||
expose:
|
||||
- "3000"
|
||||
- "5000"
|
||||
- "8000"
|
||||
links:
|
||||
- redis
|
||||
networks:
|
||||
- default
|
||||
|
||||
|
||||
redis:
|
||||
image: redis:3.0
|
||||
networks:
|
||||
networks:
|
||||
- default
|
||||
ports:
|
||||
- "6379/tcp"
|
||||
|
||||
@@ -64,6 +64,16 @@
|
||||
"name": "5001",
|
||||
"port": 5001,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "8000",
|
||||
"port": 8000,
|
||||
"targetPort": 8000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
@@ -175,6 +185,12 @@
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000
|
||||
},
|
||||
{
|
||||
"containerPort": 3000
|
||||
},
|
||||
{
|
||||
"containerPort": 8000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
@@ -64,6 +64,16 @@
|
||||
"name": "5001",
|
||||
"port": 5001,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "8000",
|
||||
"port": 8000,
|
||||
"targetPort": 8000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
@@ -229,6 +239,12 @@
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000
|
||||
},
|
||||
{
|
||||
"containerPort": 3000
|
||||
},
|
||||
{
|
||||
"containerPort": 8000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
@@ -6,6 +6,9 @@ services:
|
||||
image: tutum/hello-world
|
||||
ports:
|
||||
- 80:80
|
||||
expose: # this may be mis-usage, only to test expose with ports.
|
||||
- "3000"
|
||||
- "80"
|
||||
networks:
|
||||
- helloworld-network
|
||||
|
||||
|
||||
+8
@@ -23,6 +23,11 @@
|
||||
"name": "80",
|
||||
"port": 80,
|
||||
"targetPort": 80
|
||||
},
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
@@ -76,6 +81,9 @@
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80
|
||||
},
|
||||
{
|
||||
"containerPort": 3000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
Reference in New Issue
Block a user