Created
November 12, 2015 01:25
-
-
Save bprashanth/382ea382a6be6b10c424 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: echoheaders | |
name: echoheaders | |
spec: | |
# Type NodePort is essentially a request 30301 on every Node in your cluster | |
type: NodePort | |
ports: | |
# NodePort for the Kubernetes Service (use this to access it outside the cluster) | |
- nodePort: 30301 | |
# Port for the Kubernetes Service (use this to access it within the cluster) | |
port: 80 | |
# Port of the echoheaders pod | |
targetPort: 8080 | |
selector: | |
app: echoheaders | |
--- | |
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: echoheaders | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: echoheaders | |
spec: | |
containers: | |
- name: echoheaders | |
image: gcr.io/google_containers/echoserver:1.0 | |
ports: | |
- containerPort: 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment