Deploy GitHub Pages
This commit is contained in:
parent
cca2f76586
commit
f67deeab95
24 changed files with 81 additions and 81 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -31,7 +31,7 @@ ports:
|
|||
- name: prometheus
|
||||
containerPort: 10254
|
||||
..
|
||||
</code></pre></div></p> </li> </ul> </li> </ul> <h2 id=deploy-and-configure-prometheus-server>Deploy and configure Prometheus Server<a class=headerlink href=#deploy-and-configure-prometheus-server title="Permanent link"> ¶</a></h2> <p>Note that the kustomize bases used in this tutorial are stored in the <a href=https://github.com/kubernetes/ingress-nginx/tree/master/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></p> </li> </ul> </li> </ul> <h2 id=deploy-and-configure-prometheus-server>Deploy and configure Prometheus Server<a class=headerlink href=#deploy-and-configure-prometheus-server title="Permanent link"> ¶</a></h2> <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> <h3 id=prometheus-dashboard>Prometheus Dashboard<a class=headerlink href=#prometheus-dashboard title="Permanent link"> ¶</a></h3> <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>
|
||||
|
|
@ -47,7 +47,7 @@ default-http-backend ClusterIP 10.103.59.201 <none> 80/TCP
|
|||
ingress-nginx NodePort 10.97.44.72 <none> 80:30100/TCP,443:30154/TCP,10254:32049/TCP 5h
|
||||
prometheus-server NodePort 10.98.233.86 <none> 9090:32630/TCP 10m
|
||||
grafana NodePort 10.98.233.87 <none> 3000:31086/TCP 10m
|
||||
</code></pre></div></p> </li> <li> <p>Open your browser and visit the following URL: <em>http://{node IP address}:{grafana-svc-nodeport}</em> to load the Grafana Dashboard. According to the above example, this URL will be http://10.192.0.3:31086</p> </li> </ul> <p>The username and password is <code>admin</code></p> <ul> <li> <p>After the login you can import the Grafana dashboard from <a href=https://github.com/kubernetes/ingress-nginx/tree/master/deploy/grafana/dashboards>official dashboards</a>, by following steps given below :</p> <ul> <li>Navigate to lefthand panel of grafana</li> <li>Hover on the gearwheel icon for Configuration and click "Data Sources"</li> <li>Click "Add data source"</li> <li>Select "Prometheus"</li> <li>Enter the details (note: I used http://CLUSTER_IP_PROMETHEUS_SVC:9090)</li> <li>Left menu (hover over +) -> Dashboard</li> <li>Click "Import"</li> <li>Enter the copy pasted json from https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/grafana/dashboards/nginx.json</li> <li>Click Import JSON</li> <li>Select the Prometheus data source</li> <li>Click "Import"</li> </ul> </li> </ul> <p><img alt="Grafana Dashboard" src=../../images/grafana.png></p> <h2 id=caveats>Caveats<a class=headerlink href=#caveats title="Permanent link"> ¶</a></h2> <h3 id=wildcard-ingresses>Wildcard ingresses<a class=headerlink href=#wildcard-ingresses title="Permanent link"> ¶</a></h3> <ul> <li>By default request metrics are labeled with the hostname. When you have a wildcard domain ingress, then there will be no metrics for that ingress (to prevent the metrics from exploding in cardinality). To get metrics in this case you need to run the ingress controller with <code>--metrics-per-host=false</code> (you will lose labeling by hostname, but still have labeling by ingress).</li> </ul> <h2 id=grafana-dashboard-using-ingress-resource>Grafana dashboard using ingress resource<a class=headerlink href=#grafana-dashboard-using-ingress-resource title="Permanent link"> ¶</a></h2> <ul> <li>If you want to expose the dashboard for grafana using a ingress resource, then you can : <ul> <li>change the service type of the prometheus-server service and the grafana service to "ClusterIP" like this : <div class=highlight><pre><span></span><code>kubectl -n ingress-nginx edit svc grafana
|
||||
</code></pre></div></p> </li> <li> <p>Open your browser and visit the following URL: <em>http://{node IP address}:{grafana-svc-nodeport}</em> to load the Grafana Dashboard. According to the above example, this URL will be http://10.192.0.3:31086</p> </li> </ul> <p>The username and password is <code>admin</code></p> <ul> <li> <p>After the login you can import the Grafana dashboard from <a href=https://github.com/kubernetes/ingress-nginx/tree/main/deploy/grafana/dashboards>official dashboards</a>, by following steps given below :</p> <ul> <li>Navigate to lefthand panel of grafana</li> <li>Hover on the gearwheel icon for Configuration and click "Data Sources"</li> <li>Click "Add data source"</li> <li>Select "Prometheus"</li> <li>Enter the details (note: I used http://CLUSTER_IP_PROMETHEUS_SVC:9090)</li> <li>Left menu (hover over +) -> Dashboard</li> <li>Click "Import"</li> <li>Enter the copy pasted json from https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/grafana/dashboards/nginx.json</li> <li>Click Import JSON</li> <li>Select the Prometheus data source</li> <li>Click "Import"</li> </ul> </li> </ul> <p><img alt="Grafana Dashboard" src=../../images/grafana.png></p> <h2 id=caveats>Caveats<a class=headerlink href=#caveats title="Permanent link"> ¶</a></h2> <h3 id=wildcard-ingresses>Wildcard ingresses<a class=headerlink href=#wildcard-ingresses title="Permanent link"> ¶</a></h3> <ul> <li>By default request metrics are labeled with the hostname. When you have a wildcard domain ingress, then there will be no metrics for that ingress (to prevent the metrics from exploding in cardinality). To get metrics in this case you need to run the ingress controller with <code>--metrics-per-host=false</code> (you will lose labeling by hostname, but still have labeling by ingress).</li> </ul> <h2 id=grafana-dashboard-using-ingress-resource>Grafana dashboard using ingress resource<a class=headerlink href=#grafana-dashboard-using-ingress-resource title="Permanent link"> ¶</a></h2> <ul> <li>If you want to expose the dashboard for grafana using a ingress resource, then you can : <ul> <li>change the service type of the prometheus-server service and the grafana service to "ClusterIP" like this : <div class=highlight><pre><span></span><code>kubectl -n ingress-nginx edit svc grafana
|
||||
</code></pre></div></li> <li>This will open the currently deployed service grafana in the default editor configured in your shell (vi/nvim/nano/other)</li> <li>scroll down to line 34 that looks like "type: NodePort"</li> <li>change it to look like "type: ClusterIP". Save and exit.</li> <li>create a ingress reource with backend as "grafana" and port as "3000"</li> </ul> </li> <li>Similarly, you can edit the service "prometheus-server" and add a ingress resource.</li> </ul> </article> </div> </div> </main> <footer class=md-footer> <div class=md-footer-nav> <nav class="md-footer-nav__inner md-grid" aria-label=Footer> <a href=../miscellaneous/ class="md-footer-nav__link md-footer-nav__link--prev" rel=prev> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Previous </span> Miscellaneous </div> </div> </a> <a href=../multiple-ingress/ class="md-footer-nav__link md-footer-nav__link--next" rel=next> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Next </span> Multiple Ingress controllers </div> </div> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> </div> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> </div> </div> </footer> </div> <script src=../../assets/javascripts/vendor.93c04032.min.js></script> <script src=../../assets/javascripts/bundle.83e5331e.min.js></script><script id=__lang type=application/json>{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script>
|
||||
app = initialize({
|
||||
base: "../..",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue