Skip to content

Commit

Permalink
Merge pull request #24 from p-alik/master
Browse files Browse the repository at this point in the history
exercises 29: set correct selector value
  • Loading branch information
bmuschko committed May 9, 2024
2 parents 204f000 + 00a2c95 commit d7a3d0e
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit d7a3d0e

Please sign in to comment.