Skip to content

Instantly share code, notes, and snippets.

@shettyg
Created September 28, 2016 21:57
Show Gist options
  • Save shettyg/acb7b8ee02d9fb381277c535851159a5 to your computer and use it in GitHub Desktop.
Save shettyg/acb7b8ee02d9fb381277c535851159a5 to your computer and use it in GitHub Desktop.
services
A new pod:
apiVersion: v1
kind: Pod
metadata:
name: apachetwin
labels:
name: apache
spec:
containers:
- name: apachetwin
image: fedora/apache
A east-west service:
apiVersion: v1
kind: Service
metadata:
labels:
name: apacheservice
role: service
name: apacheservice
spec:
ports:
- port: 8800
targetPort: 80
protocol: TCP
name: tcp
selector:
name: apache
A north-south service:
apiVersion: v1
kind: Service
metadata:
labels:
name: apacheexternal
role: service
name: apacheexternal
spec:
ports:
- port: 8800
targetPort: 80
protocol: TCP
name: tcp
selector:
name: apache
type: NodePort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment