Skip to content

Instantly share code, notes, and snippets.

@gianrubio
Last active October 1, 2017 20:27
Show Gist options
  • Save gianrubio/2580ffbbfef77c0a88ce0a2fda7e62d1 to your computer and use it in GitHub Desktop.
Save gianrubio/2580ffbbfef77c0a88ce0a2fda7e62d1 to your computer and use it in GitHub Desktop.
nginx-pod-svc.yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx
namespace: default
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
labels:
app: nginx
name: nginx
namespace: default
spec:
ports:
- name: web
port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx
type: ClusterIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment