57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
apiVersion: v1
|
|
kind: ReplicationController
|
|
metadata:
|
|
name: nginx-ingress-3rdpartycfg
|
|
labels:
|
|
k8s-app: nginx-ingress-lb
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
k8s-app: nginx-ingress-lb
|
|
template:
|
|
metadata:
|
|
labels:
|
|
k8s-app: nginx-ingress-lb
|
|
name: nginx-ingress-lb
|
|
spec:
|
|
containers:
|
|
- image: gcr.io/google_containers/nginx-third-party:0.3
|
|
name: nginx-ingress-lb
|
|
imagePullPolicy: Always
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 10249
|
|
scheme: HTTP
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 5
|
|
# use downward API
|
|
env:
|
|
- name: POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
ports:
|
|
- containerPort: 80
|
|
hostPort: 80
|
|
- containerPort: 443
|
|
hostPort: 4444
|
|
# we expose 8080 to access nginx stats in url /nginx-status
|
|
# this is optional
|
|
- containerPort: 8080
|
|
hostPort: 8081
|
|
# service echoheaders as TCP service default/echoheaders:9000
|
|
# 9000 indicates the port used to expose the service
|
|
- containerPort: 9000
|
|
hostPort: 9000
|
|
args:
|
|
- /nginx-third-party-lb
|
|
- --default-backend-service=default/default-http-backend
|