Skip to content

Instantly share code, notes, and snippets.

@nagas
Last active February 18, 2017 14:11
Show Gist options
  • Save nagas/22faf1fb8c7424e6f638113a92e92603 to your computer and use it in GitHub Desktop.
Save nagas/22faf1fb8c7424e6f638113a92e92603 to your computer and use it in GitHub Desktop.
---
#apiVersion: v1
#kind: ReplicationController
#metadata:
# name: hello
#spec:
# replicas: 3
# selector:
# app: hello
# template:
# metadata:
# labels:
# app: hello
# spec:
# dnsPolicy: ClusterFirst
# containers:
# - name: service
# image: buoyantio/helloworld:0.0.5
# env:
# - name: NODE_NAME
# valueFrom:
# fieldRef:
# fieldPath: spec.nodeName
# - name: POD_IP
# valueFrom:
# fieldRef:
# fieldPath: status.podIP
# - name: http_proxy
# value: $(NODE_NAME):4140
# command:
# - "/bin/bash"
# - "-c"
# - "python hello.py & wait $!"
# ports:
# - name: service
# containerPort: 7777
#---
#apiVersion: v1
#kind: Service
#metadata:
# name: hello
#spec:
# selector:
# app: hello
# type: ClusterIP
# ports:
# - name: http
# port: 7777
# - name: external
# port: 80
# targetPort: 7777
---
apiVersion: v1
kind: ReplicationController
metadata:
name: world-v1
spec:
replicas: 2
selector:
app: world-v1
template:
metadata:
labels:
app: world-v1
spec:
dnsPolicy: ClusterFirst
containers:
- name: service
image: buoyantio/helloworld:0.0.5
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: TARGET_WORLD
value: world
command:
- "/bin/bash"
- "-c"
- "python world.py & wait $!"
ports:
- name: service
containerPort: 7778
---
apiVersion: v1
kind: Service
metadata:
name: world-v1
spec:
selector:
app: world-v1
clusterIP: None
ports:
- name: http
port: 7778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment