Last active
March 28, 2018 17:14
-
-
Save santiagopoli/9a43b31a0fd5d6ee58f97d704b51d6c6 to your computer and use it in GitHub Desktop.
Kubernetes / 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: nginx | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: nginx | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:latest | |
ports: | |
- containerPort: 80 | |
volumeMounts: | |
- mountPath: /srv/www | |
name: nginx-volume | |
volumes: | |
- name: nginx-volume | |
emptyDir: {} | |
--- | |
apiVersion: v2 | |
kind: Service | |
type: NodePort | |
metadata: | |
name: nginx | |
spec: | |
selector: | |
app: nginx | |
ports: | |
- port: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment