Created
February 21, 2017 11:53
-
-
Save craigwillis85/47f30eab1b7f43444afaaeb2f1a970d1 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: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: example | |
| labels: | |
| name: example | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| name: example | |
| template: | |
| metadata: | |
| labels: | |
| name: example | |
| spec: | |
| containers: | |
| - name: example | |
| image: something/example:56 | |
| imagePullPolicy: Always | |
| env: | |
| - name: GET_HOSTS_FROM | |
| value: dns | |
| ports: | |
| - containerPort: 80 | |
| name: http | |
| protocol: TCP | |
| - containerPort: 443 | |
| name: https | |
| protocol: TCP | |
| imagePullSecrets: | |
| - name: docker | |
| restartPolicy: Always |
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: | |
| labels: | |
| name: example | |
| spec: | |
| ports: | |
| - | |
| name: http | |
| port: 80 | |
| protocol: TCP | |
| targetPort: 80 | |
| - | |
| name: https | |
| port: 443 | |
| protocol: TCP | |
| targetPort: 443 | |
| selector: | |
| app: example |
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: extensions/v1beta1 | |
| kind: DaemonSet | |
| metadata: | |
| name: nginx-ingress-controller | |
| spec: | |
| template: | |
| metadata: | |
| labels: | |
| name: nginx-ingress-lb | |
| spec: | |
| nodeSelector: | |
| role: nginx-ingress | |
| terminationGracePeriodSeconds: 60 | |
| hostNetwork: true | |
| containers: | |
| - image: gcr.io/google_containers/nginx-ingress-controller:0.8.3 | |
| name: nginx-ingress-lb | |
| imagePullPolicy: Always | |
| readinessProbe: | |
| httpGet: | |
| path: /healthz | |
| port: 10254 | |
| scheme: HTTP | |
| livenessProbe: | |
| httpGet: | |
| path: /healthz | |
| port: 10254 | |
| 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 | |
| name: http | |
| protocol: TCP | |
| - containerPort: 443 | |
| name: https | |
| protocol: TCP | |
| # we expose 18080 to access nginx stats in url /nginx-status | |
| # this is optional | |
| #- containerPort: 18080 | |
| # hostPort: 18080 | |
| args: | |
| - /nginx-ingress-controller | |
| - --default-backend-service=$(POD_NAMESPACE)/example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment