Last active
July 2, 2019 15:32
-
-
Save NeoTech/40ae6888a0466f3f822a4398170e5130 to your computer and use it in GitHub Desktop.
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: v1 | |
kind: Service | |
metadata: | |
name: nginx-nodeport | |
namespace: default | |
spec: | |
ports: | |
- port: 80 | |
protocol: TCP | |
targetPort: 80 | |
selector: | |
app: nginx | |
env: dev | |
type: NodePort | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx | |
spec: | |
strategy: | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 10 | |
selector: | |
matchLabels: | |
app: nginx | |
env: dev | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: nginx | |
env: dev | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:latest | |
imagePullPolicy: Always | |
ports: | |
- containerPort: 80 | |
volumeMounts: | |
- mountPath: /mnt | |
name: host-mount | |
readinessProbe: | |
exec: # note this is now how we do readiness. | |
command: | |
- ls | |
- / | |
initialDelaySeconds: 5 | |
periodSeconds: 5 | |
volumes: | |
- name: host-mount | |
hostPath: | |
# directory location on host | |
path: /Users/ | |
# this field is optional | |
type: Directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment