Last active
November 7, 2017 06:13
-
-
Save superbrothers/1b8b1e6e0dd13acf62be93c6cd329d92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: default-http-backend | |
namespace: kube-system | |
labels: | |
k8s-app: default-http-backend | |
spec: | |
selector: | |
k8s-app: default-http-backend | |
ports: | |
- name: 8080-8080 | |
port: 8080 | |
targetPort: 8080 | |
protocol: TCP | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: default-http-backend | |
namespace: kube-system | |
labels: | |
k8s-app: default-http-backend | |
spec: | |
template: | |
metadata: | |
labels: | |
k8s-app: default-http-backend | |
spec: | |
terminationGracePeriodSeconds: 60 | |
containers: | |
- name: default-http-backend | |
# Any image is permissable as long as: | |
# 1. It serves a 404 page at / | |
# 2. It serves 200 on a /healthz endpoint | |
image: gcr.io/google_containers/defaultbackend:1.2 | |
livenessProbe: | |
httpGet: | |
path: /healthz | |
port: 8080 | |
scheme: HTTP | |
initialDelaySeconds: 30 | |
timeoutSeconds: 5 | |
ports: | |
- containerPort: 8080 | |
resources: | |
limits: | |
cpu: 10m | |
memory: 20Mi | |
requests: | |
cpu: 10m | |
memory: 20Mi | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: ingress | |
namespace: kube-system | |
labels: | |
k8s-app: nghttpx-ingress-lb | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: nghttpx-ingress-controller | |
namespace: kube-system | |
labels: | |
k8s-app: nghttpx-ingress-lb | |
spec: | |
template: | |
metadata: | |
labels: | |
k8s-app: nghttpx-ingress-lb | |
name: nghttpx-ingress-lb | |
spec: | |
serviceAccountName: ingress | |
terminationGracePeriodSeconds: 60 | |
containers: | |
- image: zlabjp/nghttpx-ingress-controller:latest | |
name: nghttpx-ingress-lb | |
imagePullPolicy: Always | |
livenessProbe: | |
httpGet: | |
path: /healthz | |
# when changing this port, also specify it using --healthz-port in nghttpx-ingress-controller args. | |
port: 11249 | |
scheme: HTTP | |
initialDelaySeconds: 30 | |
timeoutSeconds: 5 | |
# use downward API | |
env: | |
- name: POD_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.name | |
- name: POD_NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
ports: | |
- containerPort: 80 | |
hostPort: 80 | |
- containerPort: 443 | |
hostPort: 443 | |
args: | |
- /nghttpx-ingress-controller | |
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend | |
- --allow-internal-ip | |
- --logtostderr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment