Hybrid Deployment
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: webdeployment | |
spec: | |
replicas: 3 | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
minReadySeconds: 3 | |
template: | |
metadata: | |
labels: | |
app: "dockertest" | |
tier: "web" | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:latest | |
imagePullPolicy: Always | |
ports: | |
- containerPort: 80 | |
nodeSelector: | |
beta.kubernetes.io/os: linux | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: webiisdeployment | |
spec: | |
replicas: 3 | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
minReadySeconds: 3 | |
template: | |
metadata: | |
labels: | |
app: "dockertest" | |
tier: "webiis" | |
spec: | |
containers: | |
- name: dockerwebiis | |
image: microsoft/iis | |
imagePullPolicy: Always | |
ports: | |
- containerPort: 80 | |
nodeSelector: | |
beta.kubernetes.io/os: windows | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: webservice | |
labels: | |
app: "dockertest" | |
tier: "web" | |
spec: | |
selector: | |
app: "dockertest" | |
tier: "web" | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 80 | |
type: LoadBalancer | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: webiisservice | |
labels: | |
app: "dockertest" | |
tier: "webiis" | |
spec: | |
selector: | |
app: "dockertest" | |
tier: "webiis" | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 80 | |
type: LoadBalancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment