Skip to content

Commit

Permalink
fix walkthrough example
Browse files Browse the repository at this point in the history
The service created by this command did not match the port name used
later on in the walkthrough. Therefor it is defined explicitly here.
  • Loading branch information
TheKangaroo committed Mar 5, 2021
1 parent 7e11fe3 commit 3bd8b54
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions docs/walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,33 @@ spec:
</details>
<details>
<summary>sample-app.service.yaml</summary>
```yaml
apiVersion: v1
kind: Service
metadata:
labels:
app: sample-app
name: sample-app
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
app: sample-app
type: ClusterIP
```
</details>
```shell
$ kubectl create -f sample-app.deploy.yaml
$ kubectl create service clusterip sample-app --tcp=80:8080
$ kubectl create -f sample-app.service.yaml
```

Now, check your app, which exposes metrics and counts the number of
Expand Down Expand Up @@ -198,7 +222,7 @@ spec:
selector:
matchLabels:
app: sample-app
endpoints:
endpoints:
- port: http
```

Expand Down Expand Up @@ -335,7 +359,7 @@ You should see that it succesfully fetched the metric, but it hasn't tried
to scale, since there's not traffic.

Since your app is going to need to scale in response to traffic, generate
some via cURL like above:
some via cURL like above:

```shell
$ curl http://$(kubectl get service sample-app -o jsonpath='{ .spec.clusterIP }')/metrics
Expand Down

0 comments on commit 3bd8b54

Please sign in to comment.