Created
October 4, 2016 13:52
-
-
Save fvigotti/e3fdc4402e03ff36d5cad6b5016efe64 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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: hostn-port | |
name: hostn-port | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hostn-port | |
strategy: | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
app: hostn-port | |
spec: | |
containers: | |
- image: gcr.io/google_containers/serve_hostname | |
imagePullPolicy: Always | |
name: hostnames | |
ports: | |
- containerPort: 9376 | |
protocol: TCP | |
resources: {} | |
terminationMessagePath: /dev/termination-log | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
securityContext: {} | |
terminationGracePeriodSeconds: 30 |
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: hostn-port-svc | |
name: hostn-port-svc | |
spec: | |
ports: | |
- port: 95 | |
protocol: TCP | |
targetPort: 9376 | |
selector: | |
app: hostn-port | |
externalIPs: | |
- ${SERVER_IP} |
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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: hostn-hndp | |
name: hostn-hndp | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hostn-hd | |
strategy: | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
app: hostn-hd | |
annotations: | |
scheduler.alpha.kubernetes.io/affinity: > | |
{ | |
"nodeAffinity": { | |
"requiredDuringSchedulingIgnoredDuringExecution": { | |
"nodeSelectorTerms": [ | |
{ | |
"matchExpressions": [ | |
{ | |
"key": "kubernetes.io/hostname", | |
"operator": "In", | |
"values": ["${SERVER_HOSTNAME}"] | |
} | |
] | |
} | |
] | |
} | |
} | |
} | |
spec: | |
hostNetwork: true | |
containers: | |
- image: gcr.io/google_containers/serve_hostname | |
imagePullPolicy: Always | |
name: hostnames | |
ports: | |
- containerPort: 9376 | |
protocol: TCP | |
resources: {} | |
terminationMessagePath: /dev/termination-log | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
securityContext: {} | |
terminationGracePeriodSeconds: 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment