Skip to content

Instantly share code, notes, and snippets.

@neowinx
Created June 22, 2016 18:34
Show Gist options
  • Save neowinx/f43ecfafa137d1fc1b57f5004d8c604b to your computer and use it in GitHub Desktop.
Save neowinx/f43ecfafa137d1fc1b57f5004d8c604b to your computer and use it in GitHub Desktop.
Kubernetes Generic Service Template
# YAML GENERICO PARA CREAR REPLICATION CONTROLLERS CON CONFIGURACIONES MINIMAS
apiVersion: v1
kind: ReplicationController
metadata:
name: mucus-controller
spec:
replicas: 1
selector:
app: mucus
template:
metadata:
name: mucus
labels:
app: mucus
spec:
containers:
- name: mucus
image: registry.example.org:5000/example/mucus:1.0.0
ports:
- containerPort: 80
# YAML GENERICO PARA CREAR SERVICES CON CONFIGURACIONES MINIMAS
apiVersion: v1
kind: Service
metadata:
labels:
name: mucus
name: mucus-service
spec:
ports:
# The port that this service should serve on.
- nodePort: 30076
port: 80
# Label keys and values that must match in order to receive traffic for this service.
selector:
app: mucus
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment