node port and cluster ip services

This commit is contained in:
Stefan Prodan
2018-01-06 12:17:11 +02:00
parent bfd4428aff
commit 493fa2f719
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
---
apiVersion: v1
kind: Service
metadata:
name: podinfo-clusterip
labels:
app: podinfo
spec:
type: ClusterIP
ports:
- port: 9898
targetPort: 9898
protocol: TCP
selector:
app: podinfo

View File

@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
name: podinfo-nodeport
labels:
app: podinfo
spec:
type: NodePort
ports:
- port: 9898
targetPort: 9898
nodePort: 31190
protocol: TCP
selector:
app: podinfo