You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/get-started/labs/create-netpols.md
+20-8Lines changed: 20 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ The egress rules are namespace wide. You cannot bind an egress policy to one Wor
66
66
67
67
### Build Images for the Application
68
68
69
-
Build the `Vote`, `Worker` and `Result` images from this [repo](https://github.com/linode/apl-example-app). Use the Build feature to build the images with `mode: Docker`. Set the `path` to `./vote/Dockerfile` for the Vote image (and `./worker/Dockerfile` for the Worker and `./result/Dockerfile` for Result).
69
+
Build the `vote`, `worker` and `result` images from this [repo](https://github.com/linode/apl-example-app). Use the Build feature to build the images with `mode: Docker`. Set the `path` to `./vote/Dockerfile` for the Vote image (and `./worker/Dockerfile` for the Worker and `./result/Dockerfile` for Result).
70
70
71
71
### Create a Redis Cluster and a PostgreSQL Database
72
72
@@ -86,6 +86,7 @@ containerPorts:
86
86
env:
87
87
- name: REDIS_HOST
88
88
value: <redis-cluster-name>-master
89
+
replicaCount: 1
89
90
```
90
91
91
92
### Deploy the Worker App
@@ -114,8 +115,13 @@ env:
114
115
value: <redis-cluster-name>-master
115
116
- name: DATABASE_HOST
116
117
value: <psql-cluster-name>-rw
118
+
replicaCount: 1
117
119
```
118
120
121
+
:::note
122
+
The worker pod will show an error “Waiting for db” in the logs. This is an expected error that will be resolved when all the steps in the lab are done.
123
+
:::
124
+
119
125
### Deploy the Result App
120
126
121
127
Use the `k8s-deployment` chart to deploy the result app. Use the following values:
@@ -140,7 +146,13 @@ env:
140
146
key: password
141
147
- name: DATABASE_HOST
142
148
value: <psql-cluster-name>-rw
149
+
- name: DATABASE_NAME
150
+
value: <psql-cluster-name>
151
+
replicaCount: 1
143
152
```
153
+
:::note
154
+
The result pod will show an error “Waiting for db” in the logs. This is an expected error that will be resolved when all the steps in the lab are done.
155
+
:::
144
156
145
157
### Register Services for Exposure
146
158
@@ -151,38 +163,38 @@ env:
151
163
152
164
#### Result
153
165
154
-
- Register the `<result>` service.
166
+
- Register the `result` service.
155
167
- Set exposure to `External`.
156
168
157
169
### Create the Network Policies for the Example Voting App
158
170
159
171
#### Postgres Database
160
172
161
-
1. Create a new `Netpol` and select the `ingress` rule type.
173
+
1. Create a new `Network policy` and select the `ingress` rule type.
162
174
163
175
2. Add the selector label name `otomi.io/app`.
164
176
165
177
3. Add the selector label value `<postgres-workload-name>`.
166
178
167
179
4. Select `AllowOnly`.
168
180
169
-
5. Add the namespace `<team-name>`, the selector label name `otomi.io/app` and the selector label value `<worker>`.
181
+
5. Add the namespace `team-<name>`, the selector label name `otomi.io/app` and the selector label value `worker`.
170
182
171
-
6. Add the namespace `<team-name>`, the selector label name `otomi.io/app` and the selector label value `<result>`.
183
+
6. Add the namespace `team-<name>`, the selector label name `otomi.io/app` and the selector label value `result`.
172
184
173
185
#### Redis
174
186
175
-
1. Create a new `Netpol` and select the `ingress` rule type.
187
+
1. Create a new `Network policy` and select the `ingress` rule type.
176
188
177
189
2. Add the selector label name `otomi.io/app`.
178
190
179
191
3. Add the selector label value `<redis-workload-name>`.
180
192
181
193
4. Select `AllowOnly`.
182
194
183
-
5. Add the namespace `<team-name>`, the selector label name `otomi.io/app` and the selector label value `<worker>`.
195
+
5. Add the namespace `team-<name>`, the selector label name `otomi.io/app` and the selector label value `worker`.
184
196
185
-
6. Add the namespace `<team-name>`, the selector label name `otomi.io/app` and the selector label value `<vote>`.
197
+
6. Add the namespace `team-<name>`, the selector label name `otomi.io/app` and the selector label value `vote`.
0 commit comments