Created
September 20, 2018 09:01
-
-
Save michidk/33f547808b4251401a2802590ce79134 to your computer and use it in GitHub Desktop.
k8-nginx
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: my-nginx | |
spec: | |
selector: | |
matchLabels: | |
run: my-nginx | |
replicas: 1 | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
run: my-nginx | |
spec: | |
containers: | |
- name: my-nginx | |
image: nginx | |
ports: | |
- name: http | |
containerPort: 80 | |
protocol: TCP | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: my-nginx | |
labels: | |
run: my-nginx | |
spec: | |
type: ClusterIP | |
ports: | |
- name: http | |
port: 80 | |
protocol: TCP | |
targetPort: http | |
selector: | |
run: my-nginx | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: my-nginx | |
annotations: | |
kubernetes.io/ingress.class: traefik | |
spec: | |
rules: | |
- host: vps.brokenvector.com | |
http: | |
paths: | |
- backend: | |
serviceName: my-nginx | |
servicePort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment