-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path9-3.txt
51 lines (44 loc) · 761 Bytes
/
9-3.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//terminal
// vi nginx-pod-style.yaml
/* nginx-pod-style.yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
*/
//terminal
// kubectl create -f nginx-pod-style.yaml
// kubectl get pod
// kubectl get pod
// wget 172.17.0.10
// kubectl delete pod nginx
// kubectl get pod
// vi nginx-sql-pod-style.yaml
/* nginx-sql-pod-style.yaml
apiVersion: v1
kind: Pod
metadata:
name: web
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
- name: database
image: postgres
volumeMounts:
-name: postgres-storage
mountPath: /data/storage
volumes:
-name: postgres-storage
emptyDir: {}
*/
//terminal
// kubectl create -f nginx-sql-pod-style.yaml