Skip to content

Commit bca49be

Browse files
authored
Merge pull request #96 from linode/APL-456
fix: network policy lab
2 parents be73f3d + efe878e commit bca49be

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

docs/get-started/labs/create-netpols.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The egress rules are namespace wide. You cannot bind an egress policy to one Wor
6666

6767
### Build Images for the Application
6868

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).
7070

7171
### Create a Redis Cluster and a PostgreSQL Database
7272

@@ -86,6 +86,7 @@ containerPorts:
8686
env:
8787
- name: REDIS_HOST
8888
value: <redis-cluster-name>-master
89+
replicaCount: 1
8990
```
9091
9192
### Deploy the Worker App
@@ -114,8 +115,13 @@ env:
114115
value: <redis-cluster-name>-master
115116
- name: DATABASE_HOST
116117
value: <psql-cluster-name>-rw
118+
replicaCount: 1
117119
```
118120

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+
119125
### Deploy the Result App
120126

121127
Use the `k8s-deployment` chart to deploy the result app. Use the following values:
@@ -140,7 +146,13 @@ env:
140146
key: password
141147
- name: DATABASE_HOST
142148
value: <psql-cluster-name>-rw
149+
- name: DATABASE_NAME
150+
value: <psql-cluster-name>
151+
replicaCount: 1
143152
```
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+
:::
144156

145157
### Register Services for Exposure
146158

@@ -151,38 +163,38 @@ env:
151163

152164
#### Result
153165

154-
- Register the `<result>` service.
166+
- Register the `result` service.
155167
- Set exposure to `External`.
156168

157169
### Create the Network Policies for the Example Voting App
158170

159171
#### Postgres Database
160172

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.
162174

163175
2. Add the selector label name `otomi.io/app`.
164176

165177
3. Add the selector label value `<postgres-workload-name>`.
166178

167179
4. Select `AllowOnly`.
168180

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`.
170182

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`.
172184

173185
#### Redis
174186

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.
176188

177189
2. Add the selector label name `otomi.io/app`.
178190

179191
3. Add the selector label value `<redis-workload-name>`.
180192

181193
4. Select `AllowOnly`.
182194

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`.
184196

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`.
186198

187199
### Test the Voting App
188200

0 commit comments

Comments
 (0)