Last active
May 9, 2022 12:34
-
-
Save calvin-puram/cb1e6c95be8c7d794d8e935a4f0e0148 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/v1 | |
| kind: Deployment | |
| metadata: | |
| name: app3-nginx-deployment | |
| labels: | |
| app: app3-nginx | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: app3-nginx | |
| template: | |
| metadata: | |
| labels: | |
| app: app3-nginx | |
| spec: | |
| containers: | |
| - name: app2-nginx | |
| image: kubenginx:1.0.0 | |
| ports: | |
| - containerPort: 80 | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: basics-lbc-network | |
| annotations: | |
| # Traffic Routing | |
| service.beta.kubernetes.io/aws-load-balancer-name: basics-lbc-network-lb | |
| service.beta.kubernetes.io/aws-load-balancer-type: external | |
| service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance | |
| # service.beta.kubernetes.io/aws-load-balancer-subnets: subnet-0ae14f6f1f00b4297, subnet-0fc6aa0aa885d713f, subnet-0802c0757ced57486 ## Subnets are auto-discovered if this annotation is not specified | |
| # Health Check Settings | |
| service.beta.kubernetes.io/aws-load-balancer-healthcheck-protocol: http | |
| service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: traffic-port | |
| service.beta.kubernetes.io/aws-load-balancer-healthcheck-path: /index.html | |
| service.beta.kubernetes.io/aws-load-balancer-healthcheck-healthy-threshold: "3" | |
| service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold: "3" | |
| service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval: "10" # The controller currently ignores the timeout configuration due to the limitations on the AWS NLB. The default timeout for TCP is 10s and HTTP is 6s. | |
| # Access Control | |
| service.beta.kubernetes.io/load-balancer-source-ranges: 0.0.0.0/0 | |
| service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing" | |
| # AWS Resource Tags | |
| service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: Environment=dev,Team=test | |
| spec: | |
| type: LoadBalancer | |
| selector: | |
| app: app3-nginx | |
| ports: | |
| - port: 80 | |
| targetPort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment