Skip to content

Commit c55c34a

Browse files
jbrejnermichaelin
andcommitted
Implement review comments from Michael
Co-authored-by: Michael Ingeman-Nielsen <[email protected]>
1 parent fc4599f commit c55c34a

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

accessing-your-application.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ You can then access the pod on `localhost:8080`.
3535
Port forwarding is a network address translation that redirects Internet packets from one IP address
3636
to another with a specified port number to another `IP:PORT` set.
3737

38-
In Kubernetes `port-forward` creates a tunnel between your local machine and the Kubernetes cluster on
39-
the specified `IP:PORT` pairs to establish a connection to the cluster.
40-
`kubectl port-forward` allows you to forward not only pods but also services, deployments, and others.
38+
The `port-forward` command in Kubernetes forwards incoming traffic to the machine, the command is
39+
executed on, to the specified `IP:PORT` pairs inside the Kubernetes cluster. This effectively
40+
lets traffic from outside the cluster reach applications running inside the cluster.
41+
`kubectl port-forward` allows you to forward traffic to pods, services, deployments, and others.
4142

42-
More information can be found from [Use Port Forwarding to Access Applications in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
43+
More information can be found in the Kubernetes docs at
44+
[Use Port Forwarding to Access Applications in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
4345

4446
</details>
4547

@@ -78,7 +80,7 @@ The pod is defined in the `frontend-pod.yaml` file.
7880

7981
</details>
8082

81-
- Check that the pod is running with the `kubectl get pods` command.
83+
- Use the `kubectl get pods` command to verify that the pod is running.
8284

8385
You should see something like this:
8486

@@ -87,7 +89,7 @@ NAME READY STATUS RESTARTS AGE
8789
frontend 1/1 Running 0 2m
8890
```
8991

90-
- Expose the frontend with port-forward
92+
- Expose the frontend with `port-forward`
9193

9294
Port forwarding can be achieved with:
9395

persistent-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ Fill in the values:
277277
- `mountPath` is the path in the container to mount the volume to. For postgres, the database state is
278278
stored to the path `/var/lib/postgresql/data`
279279
- `subPath` should be `postgres`, and specifies a directory to be created within the volume. We need
280-
this because of a quirk with combining `AWS EBS` with Postgres. (If you are curious, why:
280+
this because of a quirk with combining `AWS EBS` with Postgres. (If you are curious why:
281281
<https://stackoverflow.com/a/51174380>)
282282

283283
<details>

rolling-updates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ spec:
118118
name: backend
119119
```
120120

121-
What happened - does the frontend still work? And are you able to see the backend version in the browser?
121+
What happened? Does the frontend still work? Are you able to see the backend version in the browser?
122122

123123
- Investigate the running pods with: `kubectl get pods`
124124

services.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ between them.
1313

1414
## Service Discovery & Services
1515

16-
One of the features of Kubernetes is that we do not have to care which machine our pods are
16+
One of the features of Kubernetes is that we do not have to know which machine our pods are
1717
running on. This does create an interesting problem for us - if we don't know where (the IP address)
1818
the pod is, how can we route traffic to it? This is solved by what is called **service discovery**,
1919
as the words imply, Kubernetes will look for your pods and dynamically route traffic to them.
@@ -32,9 +32,9 @@ the rest!
3232
The `service` then routes traffic to the pods that it selects. You can think of `service` as a kind of
3333
proxy - you route traffic to the service, and the service routes the traffic to your pods.
3434

35-
While the `service` gets a static IP address, we prefer not to use it, because Kubernetes
36-
runs its own DNS server in the cluster network, and every time we create a `service`, a DNS record is
37-
created that points to the `service` IP address.
35+
While the `service` gets a static IP address, we prefer not to use it. Kubernetes
36+
runs its own DNS server in the cluster network, and every time we create a `service`,
37+
a DNS record that points to the `service` IP address is automatically created.
3838
The DNS record is always the `name` of the service, and can be referenced either from the same
3939
namespace by using the name or from a different namespace by using the long form:
4040
`<name>.<namespace>.svc.cluster.local`.
@@ -161,7 +161,7 @@ internet, but we can still access it from within the cluster using its `CLUSTER-
161161
- No matter what type of service you choose while _exposing_ your pod, Cluster-IP is always
162162
assigned to that particular service.
163163

164-
- Every service has endpoints, which point to the actual pod serving as the backend of a particular
164+
- Every service has end-points, which point to the actual pod serving as the backend of a particular
165165
service.
166166

167167
- As soon as a service is created and is assigned a Cluster-IP, an entry is made in Kubernetes'
@@ -186,7 +186,8 @@ service from the internet.
186186

187187
There are other types of services, like `LoadBalancer`, but we won't cover them in this exercise.
188188

189-
If you want to know more about Services, you can read more about them [Service types](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types).
189+
If you want to know more about Services, you can read more about them in the Kubernetes docs for
190+
[Service types](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types).
190191

191192
> :bulb: Hint: You can use the `kubectl explain` command to get more information about the fields
192193
> in the YAML file. For example, `kubectl explain service.spec` will give you more information

0 commit comments

Comments
 (0)