1
0

multiple services to allow communication between pods

This commit is contained in:
sido 2018-06-25 16:25:13 +02:00
parent a5627a97af
commit f1c83cf0c0
5 changed files with 51 additions and 26 deletions

View File

@ -12,7 +12,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: nexus app: httpd
creationTimestamp: null creationTimestamp: null
spec: spec:
restartPolicy: Always restartPolicy: Always
@ -27,8 +27,3 @@ spec:
ports: ports:
- containerPort: 80 - containerPort: 80
resources: {} resources: {}
- name: nexus
image: sonatype/nexus:latest
ports:
- containerPort: 8081
- containerPort: 5000

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: httpd
labels:
app: httpd
spec:
type: NodePort
ports:
- port: 80
selector:
app: httpd

View File

@ -0,0 +1,24 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: nexus
labels:
app: nexus
environment: production
spec:
replicas: 1
strategy: {}
template:
metadata:
labels:
app: nexus
creationTimestamp: null
spec:
restartPolicy: Always
containers:
- name: nexus
image: sonatype/nexus:latest
ports:
- containerPort: 8081
- containerPort: 5000

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: nexus
labels:
app: nexus
spec:
type: ClusterIP
ports:
- port: 8081
- port: 5000
selector:
app: nexus

View File

@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "nexus.fullname" . }}
labels:
app: {{ template "nexus.name" . }}
chart: {{ template "nexus.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "nexus.name" . }}
release: {{ .Release.Name }}