Created
July 10, 2018 17:00
-
-
Save mousetree/099f40576c2e290283298d53c11422c3 to your computer and use it in GitHub Desktop.
Kubernetes deployment and service template
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
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: ${PROJECT_NAME} | |
spec: | |
selector: | |
app: ${PROJECT_NAME} | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 3000 | |
type: LoadBalancer | |
--- | |
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: ${PROJECT_NAME} | |
labels: | |
app: ${PROJECT_NAME} | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: ${PROJECT_NAME} | |
template: | |
metadata: | |
labels: | |
app: ${PROJECT_NAME} | |
spec: | |
containers: | |
- name: ${PROJECT_NAME} | |
image: eu.gcr.io/${GOOGLE_PROJECT_ID}/${PROJECT_NAME}:${CIRCLE_SHA1} | |
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