Skip to content

Commit c76fbd6

Browse files
authored
Remove namespace from k8s example (#275)
* remove namespace from k8s example * add remove step
1 parent 93ee0a5 commit c76fbd6

11 files changed

+8
-27
lines changed

README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,19 @@ docker stack deploy --compose-file docker-stack.yml vote
3232

3333
The folder k8s-specifications contains the YAML specifications of the Voting App's services.
3434

35-
Run the following command to create the deployments and services objects in the vote namespace:
35+
Run the following command to create the deployments and services. Note it will create these resources in your current namespace (`default` if you haven't changed it.)
3636

3737
```shell
3838
kubectl create -f k8s-specifications/
39-
vote "vote" created
40-
deployment "db" created
41-
deployment "db" created
42-
service "db" created
43-
deployment "redis" created
44-
service "redis" created
45-
deployment "result" created
46-
service "result" created
47-
deployment "vote" created
48-
service "vote" created
49-
deployment "worker" created
5039
```
5140

52-
The vote interface is then available on port 31000 on each host of the cluster, the result one is available on port 31001.
41+
The `vote` web app is then available on port 31000 on each host of the cluster, the `result` web app is available on port 31001.
42+
43+
To remove them, run:
44+
45+
```shell
46+
kubectl delete -f k8s-specifications/
47+
```
5348

5449
## Architecture
5550

k8s-specifications/db-deployment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
labels:
55
app: db
66
name: db
7-
namespace: vote
87
spec:
98
replicas: 1
109
selector:

k8s-specifications/db-service.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
labels:
55
app: db
66
name: db
7-
namespace: vote
87
spec:
98
type: ClusterIP
109
ports:

k8s-specifications/redis-deployment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
labels:
55
app: redis
66
name: redis
7-
namespace: vote
87
spec:
98
replicas: 1
109
selector:

k8s-specifications/redis-service.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
labels:
55
app: redis
66
name: redis
7-
namespace: vote
87
spec:
98
type: ClusterIP
109
ports:

k8s-specifications/result-deployment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
labels:
55
app: result
66
name: result
7-
namespace: vote
87
spec:
98
replicas: 1
109
selector:

k8s-specifications/result-service.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
labels:
55
app: result
66
name: result
7-
namespace: vote
87
spec:
98
type: NodePort
109
ports:

k8s-specifications/vote-deployment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
labels:
55
app: vote
66
name: vote
7-
namespace: vote
87
spec:
98
replicas: 1
109
selector:

k8s-specifications/vote-namespace.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

k8s-specifications/vote-service.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
labels:
55
app: vote
66
name: vote
7-
namespace: vote
87
spec:
98
type: NodePort
109
ports:

0 commit comments

Comments
 (0)