Created
May 1, 2018 03:32
-
-
Save lrepolho/5cc217eeebf822c2e57705c57873fe5d to your computer and use it in GitHub Desktop.
Simple Kubernetes Service and Deployment
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: | |
labels: | |
app: rev | |
name: rev | |
spec: | |
ports: | |
- name: http | |
port: 80 | |
protocol: TCP | |
targetPort: 80 | |
selector: | |
app: rev | |
tier: frontend | |
type: LoadBalancer | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: rev | |
name: rev | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: rev | |
tier: frontend | |
strategy: | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
app: rev | |
tier: frontend | |
spec: | |
containers: | |
- image: nginx | |
imagePullPolicy: IfNotPresent | |
name: nginx | |
ports: | |
- containerPort: 80 | |
name: nginx | |
protocol: TCP | |
restartPolicy: Always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment