mirror of
https://github.com/dockersamples/example-voting-app.git
synced 2026-02-14 18:29:51 +00:00
Remove namespace from k8s example (#275)
* remove namespace from k8s example * add remove step
This commit is contained in:
21
README.md
21
README.md
@@ -32,24 +32,19 @@ docker stack deploy --compose-file docker-stack.yml vote
|
||||
|
||||
The folder k8s-specifications contains the YAML specifications of the Voting App's services.
|
||||
|
||||
Run the following command to create the deployments and services objects in the vote namespace:
|
||||
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.)
|
||||
|
||||
```shell
|
||||
kubectl create -f k8s-specifications/
|
||||
vote "vote" created
|
||||
deployment "db" created
|
||||
deployment "db" created
|
||||
service "db" created
|
||||
deployment "redis" created
|
||||
service "redis" created
|
||||
deployment "result" created
|
||||
service "result" created
|
||||
deployment "vote" created
|
||||
service "vote" created
|
||||
deployment "worker" created
|
||||
```
|
||||
|
||||
The vote interface is then available on port 31000 on each host of the cluster, the result one is available on port 31001.
|
||||
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.
|
||||
|
||||
To remove them, run:
|
||||
|
||||
```shell
|
||||
kubectl delete -f k8s-specifications/
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: db
|
||||
name: db
|
||||
namespace: vote
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: db
|
||||
name: db
|
||||
namespace: vote
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: redis
|
||||
name: redis
|
||||
namespace: vote
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: redis
|
||||
name: redis
|
||||
namespace: vote
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: result
|
||||
name: result
|
||||
namespace: vote
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: result
|
||||
name: result
|
||||
namespace: vote
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: vote
|
||||
name: vote
|
||||
namespace: vote
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: vote
|
||||
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: vote
|
||||
name: vote
|
||||
namespace: vote
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: worker
|
||||
name: worker
|
||||
namespace: vote
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
|
||||
Reference in New Issue
Block a user