Skip to content

Instantly share code, notes, and snippets.

@erez-rabih
Last active March 4, 2016 13:25
Show Gist options
  • Save erez-rabih/e50b00446fedfc076963 to your computer and use it in GitHub Desktop.
Save erez-rabih/e50b00446fedfc076963 to your computer and use it in GitHub Desktop.
Kubernetes Replication Controller for API service
apiVersion: v1
kind: ReplicationController
metadata:
name: api-{{RC_TAG}}
labels:
app: api
tag: "{{RC_TAG}}"
spec:
replicas: 3
selector:
app: api
tag: "{{RC_TAG}}"
template:
metadata:
labels:
app: api
tag: "{{RC_TAG}}"
spec:
containers:
- name: api-app
image: {{APP_IMAGE}}
resources:
requests:
cpu: 500m
ports:
- name: application
containerPort: 3000
- name: api-nginx
image: {{NGINX_IMAGE}}
resources:
requests:
cpu: 100m
ports:
- name: http
containerPort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment