Deploy GitHub Pages
This commit is contained in:
parent
dd392681f1
commit
a753fbb383
4 changed files with 67 additions and 55 deletions
|
|
@ -12,9 +12,9 @@ controller:
|
|||
service:
|
||||
annotations:
|
||||
prometheus.io/port: "10254"
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/scrape: "true"
|
||||
..
|
||||
</code></pre></div></li> <li> <p>If you are <strong>not using helm</strong>, you will have to edit your manifests like this:</p> <ul> <li> <p>Service manifest: <div class=highlight><pre><span></span><code>apiVersion: v1
|
||||
</code></pre></div></li> <li>If you are <strong>not using helm</strong>, you will have to edit your manifests like this:<ul> <li>Service manifest: <div class=highlight><pre><span></span><code>apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
|
|
@ -27,7 +27,19 @@ spec:
|
|||
port: 10254
|
||||
targetPort: prometheus
|
||||
..
|
||||
</code></pre></div></p> </li> <li> <p>Deployment manifest: ``` apiVersion: v1 metadata: kind: Deployment annotations: prometheus.io/scrape: "true" prometheus.io/port: "10254" .. spec: ports: - name: prometheus containerPort: 10254 ..</p> <p>```</p> </li> </ul> </li> </ul> <h3 id=deploy-and-configure-prometheus-server>Deploy and configure Prometheus Server<a class=headerlink href=#deploy-and-configure-prometheus-server title="Permanent link"> ¶</a></h3> <p>Note that the kustomize bases used in this tutorial are stored in the <a href=https://github.com/kubernetes/ingress-nginx/tree/main/deploy>deploy</a> folder of the GitHub repository <a href=https://github.com/kubernetes/ingress-nginx>kubernetes/ingress-nginx</a>.</p> <ul> <li> <p>The Prometheus server must be configured so that it can discover endpoints of services. If a Prometheus server is already running in the cluster and if it is configured in a way that it can find the ingress controller pods, no extra configuration is needed.</p> </li> <li> <p>If there is no existing Prometheus server running, the rest of this tutorial will guide you through the steps needed to deploy a properly configured Prometheus server.</p> </li> <li> <p>Running the following command deploys prometheus in Kubernetes:</p> </li> </ul> <div class=highlight><pre><span></span><code>kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/prometheus/
|
||||
</code></pre></div></li> <li>Deployment manifest: <div class=highlight><pre><span></span><code>apiVersion: v1
|
||||
metadata:
|
||||
kind: Deployment
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "10254"
|
||||
..
|
||||
spec:
|
||||
ports:
|
||||
- name: prometheus
|
||||
containerPort: 10254
|
||||
..
|
||||
</code></pre></div></li> </ul> </li> </ul> <h3 id=deploy-and-configure-prometheus-server>Deploy and configure Prometheus Server<a class=headerlink href=#deploy-and-configure-prometheus-server title="Permanent link"> ¶</a></h3> <p>Note that the kustomize bases used in this tutorial are stored in the <a href=https://github.com/kubernetes/ingress-nginx/tree/main/deploy>deploy</a> folder of the GitHub repository <a href=https://github.com/kubernetes/ingress-nginx>kubernetes/ingress-nginx</a>.</p> <ul> <li> <p>The Prometheus server must be configured so that it can discover endpoints of services. If a Prometheus server is already running in the cluster and if it is configured in a way that it can find the ingress controller pods, no extra configuration is needed.</p> </li> <li> <p>If there is no existing Prometheus server running, the rest of this tutorial will guide you through the steps needed to deploy a properly configured Prometheus server.</p> </li> <li> <p>Running the following command deploys prometheus in Kubernetes:</p> </li> </ul> <div class=highlight><pre><span></span><code>kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/prometheus/
|
||||
</code></pre></div> <h4 id=prometheus-dashboard>Prometheus Dashboard<a class=headerlink href=#prometheus-dashboard title="Permanent link"> ¶</a></h4> <ul> <li>Open Prometheus dashboard in a web browser:</li> </ul> <div class=highlight><pre><span></span><code><span class=go>kubectl get svc -n ingress-nginx</span>
|
||||
<span class=go>NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE</span>
|
||||
<span class=go>default-http-backend ClusterIP 10.103.59.201 <none> 80/TCP 3d</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue