add kubernetes manifets and skaffold.yaml

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-06-21 14:02:20 -07:00
parent 28956fb240
commit 98ac7e3a10
6 changed files with 162 additions and 0 deletions

View file

@ -0,0 +1,33 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: checkoutservice
spec:
replicas: 1
template:
metadata:
labels:
app: checkoutservice
spec:
containers:
- name: server
image: checkoutservice
ports:
- containerPort: 5000
env:
- name: PRODUCT_CATALOG_SERVICE_ADDR
value: "productcatalogservice:3550"
- name: SHIPPING_SERVICE_ADDR
value: "shippingservice:50051"
---
apiVersion: v1
kind: Service
metadata:
name: checkoutservice
spec:
type: ClusterIP
selector:
app: checkoutservice
ports:
- port: 5000
targetPort: 5000

View file

@ -0,0 +1,27 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: emailservice
spec:
template:
metadata:
labels:
app: emailservice
spec:
containers:
- name: server
image: emailservice
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: emailservice
spec:
type: ClusterIP
selector:
app: emailservice
ports:
- port: 5000
targetPort: 5000

View file

@ -0,0 +1,27 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: productcatalogservice
spec:
template:
metadata:
labels:
app: productcatalogservice
spec:
containers:
- name: server
image: productcatalogservice
ports:
- containerPort: 3550
---
apiVersion: v1
kind: Service
metadata:
name: productcatalogservice
spec:
type: ClusterIP
selector:
app: productcatalogservice
ports:
- port: 3550
targetPort: 3550

View file

@ -0,0 +1,30 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: recommendationservice
spec:
template:
metadata:
labels:
app: recommendationservice
spec:
containers:
- name: server
image: recommendationservice
ports:
- containerPort: 8080
env:
- name: PRODUCT_CATALOG_SERVICE_ADDR
value: "productcatalogservice:3550"
---
apiVersion: v1
kind: Service
metadata:
name: recommendationservice
spec:
type: ClusterIP
selector:
app: recommendationservice
ports:
- port: 8080
targetPort: 8080

View file

@ -0,0 +1,27 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: shippingservice
spec:
template:
metadata:
labels:
app: shippingservice
spec:
containers:
- name: server
image: shippingservice
ports:
- containerPort: 50051
---
apiVersion: v1
kind: Service
metadata:
name: shippingservice
spec:
type: ClusterIP
selector:
app: shippingservice
ports:
- port: 50051
targetPort: 50051

18
skaffold.yaml Normal file
View file

@ -0,0 +1,18 @@
apiVersion: skaffold/v1alpha2
kind: Config
build:
artifacts:
- imageName: emailservice
workspace: src/emailservice
- imageName: productcatalogservice
workspace: src/productcatalogservice
- imageName: recommendationservice
workspace: src/recommendationservice
- imageName: shippingservice
workspace: src/shippingservice
- imageName: checkoutservice
workspace: src/checkoutservice
deploy:
kubectl:
manifests:
- ./kubernetes-manifests/**.yaml