Created
July 10, 2018 17:21
-
-
Save mousetree/cbd2f8fe38bf17c58c19f74e3a90953c to your computer and use it in GitHub Desktop.
Kubernetes deployment and service config (no templating)
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
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: my-app | |
spec: | |
selector: | |
app: my-app | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 3000 | |
type: LoadBalancer | |
--- | |
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: my-app | |
labels: | |
app: my-app | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: my-app | |
template: | |
metadata: | |
labels: | |
app: my-app | |
spec: | |
containers: | |
- name: my-app | |
image: eu.gcr.io/my-project/my-app:a78f061c524e9357eed33f489fad900077f6cb5f | |
ports: | |
- name: http | |
containerPort: 3000 | |
protocol: TCP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment