Last active
August 29, 2015 14:27
-
-
Save frapontillo/e9fa7666b0e8919c4d7f to your computer and use it in GitHub Desktop.
Multiple pods on same cluster/port
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: | |
name: upsource-service | |
name: upsource-service | |
spec: | |
type: LoadBalancer | |
ports: | |
- # The port that this service should serve on. | |
port: 80 | |
# The port exposed by the container | |
targetPort: 8080 | |
protocol: TCP | |
# Label keys and values that must match in order to receive traffic for this service. | |
selector: | |
name: upsource |
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: Pod | |
metadata: | |
name: upsource | |
labels: | |
name: upsource | |
spec: | |
containers: | |
- image: gcr.io/my-project/upsource:latest | |
name: upsource | |
ports: | |
- name: http | |
# The port exposed by the container | |
containerPort: 8080 | |
volumeMounts: | |
# Name must match the volume name below. | |
- name: my-persistent-disk | |
# Mount path within the container. | |
mountPath: /var/upsource | |
volumes: | |
- name: my-persistent-disk | |
gcePersistentDisk: | |
# This GCE persistent disk must already exist. | |
pdName: my-persistent-disk | |
fsType: ext4 |
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: | |
name: youtrack-service | |
name: youtrack-service | |
spec: | |
type: LoadBalancer | |
ports: | |
- # The port that this service should serve on. | |
port: 80 | |
# The port exposed by the container | |
targetPort: 8080 | |
protocol: TCP | |
# Label keys and values that must match in order to receive traffic for this service. | |
selector: | |
name: youtrack |
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: Pod | |
metadata: | |
name: youtrack | |
labels: | |
name: youtrack | |
spec: | |
containers: | |
- image: gcr.io/my-project/youtrack:latest | |
name: youtrack | |
ports: | |
- name: http | |
# The port exposed by the container | |
containerPort: 8080 | |
volumeMounts: | |
# Name must match the volume name below. | |
- name: my-persistent-disk | |
# Mount path within the container. | |
mountPath: /var/youtrack | |
volumes: | |
- name: my-persistent-disk | |
gcePersistentDisk: | |
# This GCE persistent disk must already exist. | |
pdName: my-persistent-disk | |
fsType: ext4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment