Last active
December 12, 2018 18:17
-
-
Save brunokrebs/5cd7922d39070bb35d4236ea667a9834 to your computer and use it in GitHub Desktop.
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: v1 | |
kind: Service | |
metadata: | |
name: nginx-cluster-ip | |
spec: | |
ports: | |
- port: 80 | |
protocol: TCP | |
targetPort: 80 | |
selector: | |
app: nginx-deployment | |
type: ClusterIP |
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/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: nginx-deployment | |
template: | |
metadata: | |
labels: | |
app: nginx-deployment | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.7.9 | |
ports: | |
- containerPort: 80 |
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: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: nginx-ingress | |
annotations: | |
nginx.ingress.kubernetes.io/rewrite-target: / | |
nginx.ingress.kubernetes.io/ssl-redirect: "false" | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: / | |
backend: | |
serviceName: nginx-cluster-ip | |
servicePort: 80 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment