Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercises 29: set correct selector value #24

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exercises/29-troubleshooting-service/solution/solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ Session Affinity: None
Events: <none>
```

Upon inspecting the Deployment, you will find that the Pod template uses the label assignment `app=webapp`. The container port is set to 3000. This information doesn't match with the configuration of the Service. The endpoints of the `web-app` Service now points to the IP address and container port of the replicas controlled by the Deployment.
Upon inspecting the Deployment, you will find that the Pod template uses the label assignment `app=web-app`. The container port is set to 3000. This information doesn't match with the configuration of the Service. The endpoints of the `web-app` Service now points to the IP address and container port of the replicas controlled by the Deployment.

```
$ kubectl get endpoints -n y72
NAME ENDPOINTS AGE
web-app 10.244.0.3:3000,10.244.0.4:3000 24m
```

Edit the live object of the Service. Change the label selector from `run=myapp` to `app=webapp`, and the target port from 3001 to 3000.
Edit the live object of the Service. Change the label selector from `run=myapp` to `app=web-app`, and the target port from 3001 to 3000.

```
$ kubectl edit service web-app -n y72
Expand Down