Created
June 2, 2021 19:06
-
-
Save dennisme/ce674e439e907bbb674cb0c995d90c63 to your computer and use it in GitHub Desktop.
deployment.yaml
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: nginx-test | |
labels: | |
application: nginx-test | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
application: nginx-test | |
template: | |
metadata: | |
labels: | |
application: nginx-test | |
spec: | |
containers: | |
- name: test-deployment | |
image: nginx:1.7.9 | |
ports: | |
- containerPort: 80 | |
name: http | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx-test | |
annotations: | |
# https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/ns1.md | |
external-dns.alpha.kubernetes.io/hostname: "nginx-test.<my-domain-here>" | |
# https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/#aws | |
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 | |
# Note that the backend talks over HTTP. | |
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http | |
# Only run SSL on the port named "https" below. | |
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https | |
spec: | |
type: LoadBalancer | |
selector: | |
application: nginx-test | |
loadBalancerIP: | |
ports: | |
- port: 80 | |
name: http | |
targetPort: http | |
- port: 443 | |
name: https | |
targetPort: http |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment