-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path9-6.txt
More file actions
45 lines (41 loc) · 698 Bytes
/
9-6.txt
File metadata and controls
45 lines (41 loc) · 698 Bytes
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
//terminal
// kubectl create -f apache-rc.yaml
// kubectl get pods
// vi apache-service.yaml
/* apache-service.yaml
apiVersion: v1
kind: Service
metadata:
name: frontend-service
ports:
- port: 80
targetPort: 80
protocol: TCP
spec:
ports:
selector:
tier: frontend
*/
//terminal
// kubectl get pod
// kubectl create -f apache-service.yaml
// kubectl get service
// kubectl get pod
// vi apache-service-yaml
/* apache-service.yaml
apiVersion: v1
kind: Service
metadata:
name: frontend-service
ports:
- port: 8000
targetPort: 80
protocol: TCP
spec:
ports:
selector:
tier: frontend
*/
//terminal
// kubectl create -f apache-service.yaml
// kubectl get service