mirror of
https://github.com/slurm-personal/school-dev-k8s.git
synced 2026-06-27 13:50:24 +00:00
Change some practice
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Hostpath
|
||||
|
||||
1) Применяем манифест
|
||||
|
||||
```bash
|
||||
kubectl apply -f ~/slurm/practice/4.saving-data/1.hostpath/
|
||||
|
||||
kubectl get pod
|
||||
kubectl get all
|
||||
kubectl describe replicaset <TAB>
|
||||
```
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: my-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: my-app
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 1
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: my-app
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx:1.12
|
||||
name: nginx
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /files
|
||||
volumes:
|
||||
- name: data
|
||||
hostPath:
|
||||
path: /data_pod
|
||||
...
|
||||
Reference in New Issue
Block a user