File tree Expand file tree Collapse file tree 3 files changed +47
-2
lines changed
docs/tasks/access-application-cluster
examples/application/mongodb Expand file tree Collapse file tree 3 files changed +47
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ for database debugging.
31
31
1 . Create a Deployment that runs MongoDB:
32
32
33
33
``` shell
34
- kubectl apply -f https://k8s.io/examples/application/guestbook /mongo-deployment.yaml
34
+ kubectl apply -f https://k8s.io/examples/application/mongodb /mongo-deployment.yaml
35
35
```
36
36
37
37
The output of a successful command verifies that the deployment was created:
@@ -84,7 +84,7 @@ for database debugging.
84
84
2. Create a Service to expose MongoDB on the network:
85
85
86
86
```shell
87
- kubectl apply -f https://k8s.io/examples/application/guestbook /mongo-service.yaml
87
+ kubectl apply -f https://k8s.io/examples/application/mongodb /mongo-service.yaml
88
88
```
89
89
90
90
The output of a successful command verifies that the Service was created:
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : mongo
5
+ labels :
6
+ app.kubernetes.io/name : mongo
7
+ app.kubernetes.io/component : backend
8
+ spec :
9
+ selector :
10
+ matchLabels :
11
+ app.kubernetes.io/name : mongo
12
+ app.kubernetes.io/component : backend
13
+ replicas : 1
14
+ template :
15
+ metadata :
16
+ labels :
17
+ app.kubernetes.io/name : mongo
18
+ app.kubernetes.io/component : backend
19
+ spec :
20
+ containers :
21
+ - name : mongo
22
+ image : mongo:4.2
23
+ args :
24
+ - --bind_ip
25
+ - 0.0.0.0
26
+ resources :
27
+ requests :
28
+ cpu : 100m
29
+ memory : 100Mi
30
+ ports :
31
+ - containerPort : 27017
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Service
3
+ metadata :
4
+ name : mongo
5
+ labels :
6
+ app.kubernetes.io/name : mongo
7
+ app.kubernetes.io/component : backend
8
+ spec :
9
+ ports :
10
+ - port : 27017
11
+ targetPort : 27017
12
+ selector :
13
+ app.kubernetes.io/name : mongo
14
+ app.kubernetes.io/component : backend
You can’t perform that action at this time.
0 commit comments