35 lines
607 B
YAML
35 lines
607 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: http-svc
|
|
labels:
|
|
app: http-svc
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 80
|
|
# This port needs to be available on all nodes in the cluster
|
|
nodePort: 30301
|
|
targetPort: 8080
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
app: http-svc
|
|
---
|
|
apiVersion: v1
|
|
kind: ReplicationController
|
|
metadata:
|
|
name: http-svc
|
|
spec:
|
|
replicas: 2
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: http-svc
|
|
spec:
|
|
containers:
|
|
- name: http-svc
|
|
image: gcr.io/google_containers/echoserver:1.3
|
|
ports:
|
|
- containerPort: 8080
|
|
|