Created
June 27, 2020 10:13
-
-
Save avielb/5a41c4c4da425e51bf94930ba3bd827b to your computer and use it in GitHub Desktop.
a.yaml
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 | |
spec: | |
selector: | |
name: nginx | |
type: NodePort | |
ports: | |
- name: foo # Actually, no port is needed. | |
port: 80 | |
targetPort: 80 | |
--- | |
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: nginx | |
labels: | |
app: nginx | |
spec: | |
selector: | |
matchLabels: | |
app: nginx | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:latest # or just image: | |
ports: | |
- containerPort: 80 | |
volumeMounts: | |
- name: config-volume | |
mountPath: /usr/share/nginx/html | |
volumes: | |
- name: config-volume | |
configMap: | |
name: myhtml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment