Skip to content

Instantly share code, notes, and snippets.

@nagas
Last active January 29, 2017 14:09
Show Gist options
  • Save nagas/b36f29359bd149f6b94a6ce9f40f2ac2 to your computer and use it in GitHub Desktop.
Save nagas/b36f29359bd149f6b94a6ce9f40f2ac2 to your computer and use it in GitHub Desktop.
---
apiVersion: v1
kind: Service
metadata:
name: gateway
spec:
ports:
- port: 6379
targetPort: 6379
nodePort: 32000
protocol: TCP
selector:
name: gateway
type: NodePort
---
apiVersion: v1
kind: ReplicationController
metadata:
name: gateway
spec:
replicas: 1
template:
metadata:
labels:
name: gateway
spec:
containers:
- name: gateway
image: amalgam8/a8-sidecar:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 6379
args:
- /usr/bin/run_filebeat.sh
env:
- name: A8_PROXY
value: "true"
- name: A8_CONTROLLER_URL
value: http://$(CONTROLLER_SERVICE_HOST):$(CONTROLLER_SERVICE_PORT)
- name: A8_CONTROLLER_POLL
value: 5s
- name: A8_SERVICE
value: gateway:none
- name: A8_DISCOVERY_ADAPTER
value: kubernetes
- name: A8_KUBERNETES_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
---
apiVersion: v1
kind: Service
metadata:
name: helloworld
spec:
clusterIP: None
ports:
- port: 5000
protocol: TCP
name: http
selector:
name: helloworld
---
apiVersion: v1
kind: ReplicationController
metadata:
name: helloworld-v1
spec:
replicas: 2
template:
metadata:
labels:
name: helloworld
version: v1
spec:
containers:
- name: helloworld
image: amalgam8/a8-examples-helloworld:v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
env:
- name: A8_SERVICE
value: helloworld:version=v1
---
apiVersion: v1
kind: ReplicationController
metadata:
name: helloworld-v2
spec:
replicas: 2
template:
metadata:
labels:
name: helloworld
version: v2
spec:
containers:
- name: helloworld
image: amalgam8/a8-examples-helloworld:v2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
env:
- name: A8_SERVICE
value: helloworld:version=v2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment