-
-
Save arunmk/46686edf0844990a0c3ef0a1ed78bcbe to your computer and use it in GitHub Desktop.
Demo files from NGINX Conf 2018 Using NGINX as a Kubernetes Ingress Controller talk
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
| kind: ConfigMap | |
| apiVersion: v1 | |
| metadata: | |
| name: nginx-config | |
| namespace: nginx-ingress | |
| data: | |
| worker-processes: "1" | |
| log-format: '[$time_local] $remote_addr "$request" $status "$upstream_response_time"' |
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
| kind: ConfigMap | |
| apiVersion: v1 | |
| metadata: | |
| name: nginx-config | |
| namespace: nginx-ingress | |
| data: | |
| worker-processes: "1" | |
| log-format: '[$time_local] $remote_addr "$request" $status "$upstream_response_time"' | |
| lb-method: "least_conn" |
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: Ingress | |
| metadata: | |
| name: shapes-ingress | |
| annotations: | |
| kubernetes.io/ingress.class: "nginx" | |
| nginx.org/lb-method: "random" | |
| spec: | |
| rules: | |
| - host: shapes.example.com | |
| http: | |
| paths: | |
| - path: /circles | |
| backend: | |
| serviceName: circles | |
| servicePort: 80 | |
| - path: /triangles | |
| backend: | |
| serviceName: triangles | |
| servicePort: 80 |
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: Ingress | |
| metadata: | |
| name: shapes-ingress | |
| annotations: | |
| kubernetes.io/ingress.class: "nginx" | |
| nginx.org/lb-method: "random" | |
| nginx.org/server-snippets: | | |
| location / { | |
| return 302 /circles; | |
| } | |
| spec: | |
| rules: | |
| - host: shapes.example.com | |
| http: | |
| paths: | |
| - path: /circles | |
| backend: | |
| serviceName: circles | |
| servicePort: 80 | |
| - path: /triangles | |
| backend: | |
| serviceName: triangles | |
| servicePort: 80 |
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: Ingress | |
| metadata: | |
| name: shapes-ingress | |
| annotations: | |
| kubernetes.io/ingress.class: "nginx" | |
| spec: | |
| rules: | |
| - host: shapes.example.com | |
| http: | |
| paths: | |
| - path: /circles | |
| backend: | |
| serviceName: circles | |
| servicePort: 80 | |
| - path: /triangles | |
| backend: | |
| serviceName: triangles | |
| servicePort: 80 |
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: circles | |
| spec: | |
| replicas: 3 | |
| selector: | |
| matchLabels: | |
| app: circles | |
| template: | |
| metadata: | |
| labels: | |
| app: circles | |
| spec: | |
| containers: | |
| - name: circles | |
| image: pleshakov/circles:0.1 | |
| ports: | |
| - containerPort: 80 | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: circles | |
| spec: | |
| ports: | |
| - port: 80 | |
| targetPort: 80 | |
| protocol: TCP | |
| name: http | |
| selector: | |
| app: circles | |
| --- | |
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: triangles | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: triangles | |
| template: | |
| metadata: | |
| labels: | |
| app: triangles | |
| spec: | |
| containers: | |
| - name: triangles | |
| image: pleshakov/triangles:0.1 | |
| ports: | |
| - containerPort: 80 | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: triangles | |
| labels: | |
| spec: | |
| ports: | |
| - port: 80 | |
| targetPort: 80 | |
| protocol: TCP | |
| name: http | |
| selector: | |
| app: triangles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment