Consolidate YAML files [part-14] (#9379)
This PR deals with the getting started guides (windows) and tutorials sections. Since the YAML files in the windows directory currently are not referenced at all, this PR refactored the markdown file to correct this problem. When appropriate, we use the YAML content from the markdown in the extracted version.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
FROM node:6.9.2
|
||||
EXPOSE 8080
|
||||
COPY server.js .
|
||||
CMD node server.js
|
||||
@@ -0,0 +1,9 @@
|
||||
var http = require('http');
|
||||
|
||||
var handleRequest = function(request, response) {
|
||||
console.log('Received request for URL: ' + request.url);
|
||||
response.writeHead(200);
|
||||
response.end('Hello World!');
|
||||
};
|
||||
var www = http.createServer(handleRequest);
|
||||
www.listen(8080);
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: pod-with-http-healthcheck
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
# defines the health checking
|
||||
livenessProbe:
|
||||
# an http probe
|
||||
httpGet:
|
||||
path: /_status/healthz
|
||||
port: 80
|
||||
# length of time to wait for a pod to initialize
|
||||
# after pod startup, before applying health checking
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 1
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: pod-with-tcp-socket-healthcheck
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis
|
||||
# defines the health checking
|
||||
livenessProbe:
|
||||
# a TCP socket probe
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
# length of time to wait for a pod to initialize
|
||||
# after pod startup, before applying health checking
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 1
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.7.9
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-service
|
||||
spec:
|
||||
ports:
|
||||
- port: 8000 # the port that this service should serve on
|
||||
# the container on each pod to connect to, can be a name
|
||||
# (e.g. 'www') or a number (e.g. 80)
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
# just like the selector in the deployment,
|
||||
# but this time it identifies the set of pods to load balance
|
||||
# traffic to.
|
||||
selector:
|
||||
app: nginx
|
||||
@@ -0,0 +1,31 @@
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: example-config
|
||||
data:
|
||||
example.property.1: hello
|
||||
example.property.2: world
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: configmap-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: configmap-redis
|
||||
image: redis:3.0-nanoserver
|
||||
env:
|
||||
- name: EXAMPLE_PROPERTY_1
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: example-config
|
||||
key: example.property.1
|
||||
- name: EXAMPLE_PROPERTY_2
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: example-config
|
||||
key: example.property.2
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/os: windows
|
||||
@@ -0,0 +1,21 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: my-daemonset
|
||||
labels:
|
||||
app: foo
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: foo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: foo
|
||||
spec:
|
||||
containers:
|
||||
- name: foo
|
||||
image: microsoft/windowsservercore:1709
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/os: windows
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: iis
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: iis
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: iis
|
||||
annotations:
|
||||
experimental.windows.kubernetes.io/isolation-type: hyperv
|
||||
spec:
|
||||
containers:
|
||||
- name: iis
|
||||
image: microsoft/iis
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: iis
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: iis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: iis
|
||||
spec:
|
||||
containers:
|
||||
- name: iis
|
||||
image: microsoft/iis
|
||||
resources:
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: 2
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: my-empty-dir-pod
|
||||
spec:
|
||||
containers:
|
||||
- image: microsoft/windowsservercore:1709
|
||||
name: my-empty-dir-pod
|
||||
volumeMounts:
|
||||
- mountPath: /cache
|
||||
name: cache-volume
|
||||
- mountPath: C:/scratch
|
||||
name: scratch-volume
|
||||
volumes:
|
||||
- name: cache-volume
|
||||
emptyDir: {}
|
||||
- name: scratch-volume
|
||||
emptyDir: {}
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/os: windows
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: hostpath-volume-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: my-hostpath-volume-pod
|
||||
image: microsoft/windowsservercore:1709
|
||||
volumeMounts:
|
||||
- name: foo
|
||||
mountPath: "C:\\etc\\foo"
|
||||
readOnly: true
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/os: windows
|
||||
volumes:
|
||||
- name: foo
|
||||
hostPath:
|
||||
path: "C:\\etc\\foo"
|
||||
@@ -0,0 +1,32 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: mysecret
|
||||
type: Opaque
|
||||
data:
|
||||
username: YWRtaW4=
|
||||
password: MWYyZDFlMmU2N2Rm
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: my-secret-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: my-secret-pod
|
||||
image: microsoft/windowsservercore:1709
|
||||
env:
|
||||
- name: USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mysecret
|
||||
key: username
|
||||
- name: PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mysecret
|
||||
key: password
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/os: windows
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: iis
|
||||
labels:
|
||||
name: iis
|
||||
spec:
|
||||
containers:
|
||||
- name: iis
|
||||
image: microsoft/iis:windowsservercore-1709
|
||||
ports:
|
||||
- containerPort: 80
|
||||
nodeSelector:
|
||||
"beta.kubernetes.io/os": windows
|
||||
Reference in New Issue
Block a user