Created
August 15, 2017 16:38
-
-
Save r7vme/bf7b9d8baf5e709f137a23ec6c105b05 to your computer and use it in GitHub Desktop.
ingress_test
This file contains 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/v1beta1 | |
kind: Deployment | |
metadata: | |
name: nginx-for-ingress-deployment | |
spec: | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.7.9 | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx-for-ingress-service | |
spec: | |
selector: | |
app: nginx | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 80 | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: nginx-for-ingress-ingress | |
annotations: | |
ingress.kubernetes.io/rewrite-target: / | |
spec: | |
rules: | |
- host: PUT_SITE_DNS_HERE # e.g. nginx1.xsb6t.k8s.ginger.eu-central-1.aws.gigantic.io | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: nginx-for-ingress-service | |
servicePort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment