Skip to content

Instantly share code, notes, and snippets.

@dani8art

dani8art/pets.yml

Last active Oct 20, 2017
Embed
What would you like to do?
---
apiVersion: v1
kind: Service
metadata:
name: mongodb
labels:
name: mongodb
spec:
ports:
- port: 27017
targetPort: 27017
protocol: TCP
selector:
name: mongodb
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mongodb
spec:
replicas: 1
template:
metadata:
labels:
name: mongodb
spec:
containers:
- image: mongo
name: mongodb
imagePullPolicy: Always
ports:
- name: mongodb
containerPort: 27017
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: pets-service
spec:
replicas: 1
template:
metadata:
labels:
name: pets-service
spec:
containers:
- image: darteaga/pets:sma-example01
name: pets-service
imagePullPolicy: Always
ports:
- name: pets-service
containerPort: 80
env:
- name: NODE_ENV
value: production
---
apiVersion: v1
kind: Service
metadata:
name: pets-service
labels:
name: pets-service
spec:
type: NodePort
ports:
- port: 30080
targetPort: 80
nodePort: 30080
protocol: TCP
selector:
name: pets-service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.