Last active
October 18, 2018 17:52
-
-
Save bkatiemills/ed2fe659c511872cb2e09e5251f8fcf7 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: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: default-http-backend | |
labels: | |
app: default-http-backend | |
namespace: ingressnginx | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: default-http-backend | |
template: | |
metadata: | |
labels: | |
app: default-http-backend | |
annotations: | |
seccomp.security.alpha.kubernetes.io/pod: docker/default | |
spec: | |
terminationGracePeriodSeconds: 60 | |
containers: | |
- name: default-http-backend | |
# Any image is permissible 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.4 | |
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: Service | |
metadata: | |
name: default-http-backend | |
namespace: ingressnginx | |
labels: | |
app: default-http-backend | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 8080 | |
selector: | |
app: default-http-backend | |
--- | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: nginx-configuration | |
namespace: ingressnginx | |
labels: | |
app: ingressnginx | |
--- | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: tcp-services | |
namespace: ingressnginx | |
--- | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: udp-services | |
namespace: ingressnginx | |
--- | |
apiVersion: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: nginx-ingress-controller | |
namespace: ingressnginx | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: ingressnginx | |
template: | |
metadata: | |
labels: | |
app: ingressnginx | |
annotations: | |
prometheus.io/port: '10254' | |
prometheus.io/scrape: 'true' | |
seccomp.security.alpha.kubernetes.io/pod: docker/default | |
spec: | |
initContainers: | |
- command: | |
- sh | |
- -c | |
- sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range="1024 65535" | |
image: alpine:3.6 | |
imagePullPolicy: IfNotPresent | |
name: sysctl | |
securityContext: | |
privileged: true | |
containers: | |
- name: nginx-ingress-controller | |
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.17.1 | |
args: | |
- /nginx-ingress-controller | |
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend | |
- --configmap=$(POD_NAMESPACE)/nginx-configuration | |
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services | |
- --udp-services-configmap=$(POD_NAMESPACE)/udp-services | |
- --annotations-prefix=nginx.ingress.kubernetes.io | |
env: | |
- name: POD_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.name | |
- name: POD_NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
ports: | |
- name: http | |
containerPort: 80 | |
- name: https | |
containerPort: 443 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: ingressnginx | |
namespace: ingressnginx | |
spec: | |
type: NodePort | |
ports: | |
- name: http | |
port: 80 | |
targetPort: 80 | |
protocol: TCP | |
- name: https | |
port: 443 | |
targetPort: 443 | |
protocol: TCP | |
selector: | |
app: ingressnginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment