mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 01:38:10 +00:00
Merge pull request #379 from TheKangaroo/fix/walkthrough
fix walkthrough example
This commit is contained in:
commit
976c38aee4
1 changed files with 27 additions and 3 deletions
|
|
@ -94,9 +94,33 @@ spec:
|
||||||
|
|
||||||
</details>
|
</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
|
```shell
|
||||||
$ kubectl create -f sample-app.deploy.yaml
|
$ 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
|
Now, check your app, which exposes metrics and counts the number of
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue