Set kompose.service.type label so kubernetes service is NodePort

This commit is contained in:
Tomas Pizarro
2017-05-17 15:59:05 +00:00
parent 74e3865c9a
commit 99498fb3ba
3 changed files with 12 additions and 3 deletions

View File

@@ -6,7 +6,9 @@ services:
myapp:
tty: true # Enables debugging capabilities when attached to this container.
image: bitnami/express:4
image: 'bitnami/express:4'
labels:
kompose.service.type: nodeport
command: npm run development
environment:
- PORT=3000

View File

@@ -2,11 +2,13 @@ version: '2'
services:
mongodb:
image: bitnami/mongodb:latest
image: 'bitnami/mongodb:latest'
myapp:
tty: true # Enables debugging capabilities when attached to this container.
image: bitnami/express:latest
image: 'bitnami/express:latest'
labels:
kompose.service.type: nodeport
command: npm run development
environment:
- PORT=3000

View File

@@ -20,6 +20,8 @@ items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.service.type: nodeport
creationTimestamp: null
labels:
io.kompose.service: myapp
@@ -31,6 +33,7 @@ items:
targetPort: 3000
selector:
io.kompose.service: myapp
type: NodePort
status:
loadBalancer: {}
- apiVersion: extensions/v1beta1
@@ -56,6 +59,8 @@ items:
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.service.type: nodeport
creationTimestamp: null
name: myapp
spec: