Skip to content

Instantly share code, notes, and snippets.

@mdelder
Created May 3, 2019 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdelder/d788e2f5e73f1c1c5b9afa8c48bfbe8a to your computer and use it in GitHub Desktop.
Save mdelder/d788e2f5e73f1c1c5b9afa8c48bfbe8a to your computer and use it in GitHub Desktop.
An example Kubernetes Deployment for a Node app that interacts with the Watson Conversation API. See https://ibm.co/2zKfgIX for the full recipe.
# Application to deploy
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: watson-conversation-app
spec:
replicas: 2 # tells deployment to run 2 pods matching the template
template: # create pods using pod definition in this template
metadata:
labels:
app: watson-conversation-app
tier: frontend
spec:
containers:
- name: watson-conversation-app
image: mycluster.icp:8500/default/conversation-simple:latest
resources:
requests:
cpu: 100m
memory: 100Mi
env:
- name: WORKSPACE_ID
valueFrom:
configMapKeyRef:
name: car-dashboard-config
key: workspace_id
- name: CONVERSATION_SERVICE_CAR
valueFrom:
secretKeyRef:
name: binding-conversation-service-car
key: binding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment