Commit b5209872 authored by Vũ Hoàng Nam's avatar Vũ Hoàng Nam

Update sample manifest file.

parent 28999032
apiVersion: v1
kind: ConfigMap
metadata:
name: first-cm
data:
key1: value1
key2: value2
fruits.json: |
{
"fruit": "Banana",
"size": "Large",
"color": "Red"
}
......@@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: hello-ctr
image: nigelpoulton/k8sbook:1.0
image: busybox
volumeMounts:
- name: varlog
mountPath: /var/log
......
......@@ -5,7 +5,7 @@ metadata:
spec:
replicas: 2
selector:
matchLabels:
matchLabels:
app: web-app
revisionHistoryLimit: 5
progressDeadlineSeconds: 300
......@@ -22,6 +22,11 @@ spec:
spec:
containers:
- name: hello-ctr
image: nigelpoulton/k8sbook:1.0
image: busybox
ports:
- containerPort: 8080
resources:
limits:
memory: "512Mi"
cpu: "1000m"
......@@ -2,13 +2,22 @@ apiVersion: v1
kind: Pod
metadata:
name: first-pod
namespace: default
labels:
app: busybox
version: v1
zone: dev
spec:
containers:
- name: hello-ctr
image: nigelpoulton/k8sbook:1.0
- name: tool-kit
image: busybox
command:
- sleep
- "3600"
volumeMounts:
- name: fruits
mountPath: /mnt
readOnly: true
ports:
- containerPort: 8080
resources:
......@@ -17,4 +26,12 @@ spec:
cpu: "500m"
limits:
memory: "512Mi"
cpu: "1000m"
\ No newline at end of file
cpu: "1000m"
volumes:
- name: fruits
configMap:
name: first-cm
items:
- key: fruits.json
path: data.json
\ No newline at end of file
apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: Opaque
data:
password: <Password>
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mystatefulset
spec:
selector:
matchLabels:
app: myapp
serviceName: <ServiceName>
replicas: 2
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: registry.k8s.io/nginx-slim:0.8
ports:
- containerPort: 80
name: web
volumeMounts:
- name: www
mountPath: /usr/share/nginx/html
volumeClaimTemplates:
- metadata:
name: www
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment