55 lines
1.4 KiB
YAML
55 lines
1.4 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.4
|
||
|
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
|
||
|
args:
|
||
|
- /nginx-third-party-lb
|
||
|
- --default-backend-service=default/default-http-backend
|
||
|
- --nginx-configmap=default/nginx-load-balancer-conf
|