Skip to content

Docs: Enable metrics in manifest-based deployments. #13171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

piperubio
Copy link
Contributor

What this PR does / why we need it:

This pull request improves the monitoring.md documentation by explicitly showing how to enable Prometheus metrics when deploying ingress-nginx using raw manifests.

Currently, the documentation only shows how to expose the Prometheus metrics port (10254) via the prometheus named port in the Deployment manifest. However, it omits the required argument --enable-metrics=true that actually enables nginx-specific metrics.

Without this argument, Prometheus can successfully scrape the /metrics endpoint, but it will only retrieve default Go and process-level metrics — not the nginx-related metrics such as HTTP requests, connections, or response codes. Adding --enable-metrics=true ensures that these nginx-specific metrics are computed and made available.

This clarification is particularly important for users not deploying via Helm.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • CVE Report (Scanner found CVE and adding report)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation only

Which issue/s this PR fixes

No specific issue opened, but it addresses a documentation gap related to Prometheus monitoring setup.

How Has This Been Tested?

The changes were validated by deploying ingress-nginx using the official manifests and confirming that Prometheus was able to scrape and display nginx-specific metrics from the exposed port 10254 after setting --enable-metrics=true.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added unit and/or e2e tests to cover my changes.
  • All new and existing tests passed.

Copy link

linux-foundation-easycla bot commented Apr 7, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: piperubio / name: Felipe Rubio (547c753)

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Apr 7, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @piperubio!

It looks like this is your first PR to kubernetes/ingress-nginx 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/ingress-nginx has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @piperubio. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 7, 2025
Copy link

netlify bot commented Apr 7, 2025

Deploy Preview for kubernetes-ingress-nginx ready!

Name Link
🔨 Latest commit 547c753
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/6800928b2cc6e000088f8d3f
😎 Deploy Preview https://deploy-preview-13171--kubernetes-ingress-nginx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@Gacko Gacko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign the CLA and apply the suggestions (or elaborate on why we need these characters) to get this PR merged. Thank you!

/retitle Docs: Enable metrics in manifest-based deployments.
/triage accepted
/kind documentation
/priority backlog
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 8, 2025
@k8s-ci-robot k8s-ci-robot changed the title Docs: enable Prometheus metrics in manifest-based deployments Docs: Enable metrics in manifest-based deployments. Apr 8, 2025
@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/documentation Categorizes issue or PR as related to documentation. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority labels Apr 8, 2025
@Gacko Gacko closed this Apr 12, 2025
@piperubio
Copy link
Contributor Author

piperubio commented Apr 17, 2025

Hi @Gacko ,

Thank you for your suggestions. The Contributor License Agreement (CLA) has already been signed.

Regarding the dots (...) in the code snippet, they are intentionally left to indicate that existing arguments should remain unchanged. For clarity—especially for less experienced users—it’s important to highlight that the monitoring argument should be appended to the existing list, not used as a replacement.

I sincerely apologize for the delayed response. I was disappointed to see that the pull request I submitted was closed, particularly since no alternative update to the monitoring documentation has been made by the maintainers, nor has a follow-up pull request been opened to address this addition. I still believe this change would be helpful to users deploying with raw manifests.

@Gacko
Copy link
Member

Gacko commented Apr 17, 2025

You can still re-open or re-create it. I closed it because I didn't receive any feedback.

@Gacko Gacko reopened this Apr 17, 2025
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Apr 17, 2025
Copy link
Member

@Gacko Gacko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/triage accepted
/kind documentation
/priority backlog
/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 17, 2025
@Gacko
Copy link
Member

Gacko commented Apr 17, 2025

/cherry-pick release-1.12

@k8s-infra-cherrypick-robot
Copy link
Contributor

@Gacko: once the present PR merges, I will cherry-pick it on top of release-1.12 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.12

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Gacko
Copy link
Member

Gacko commented Apr 17, 2025

/cherry-pick release-1.11

@k8s-infra-cherrypick-robot
Copy link
Contributor

@Gacko: once the present PR merges, I will cherry-pick it on top of release-1.11 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.11

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Gacko
Copy link
Member

Gacko commented Apr 17, 2025

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 17, 2025
Add enable-metrics to true in Deployment manifest for deployment without helm
@Gacko Gacko force-pushed the fix/deployment-without-helm-monitoring branch from 9f24108 to 547c753 Compare April 17, 2025 05:32
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 17, 2025
@Gacko
Copy link
Member

Gacko commented Apr 17, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 17, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Gacko, piperubio

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit c5eaeb1 into kubernetes:main Apr 17, 2025
7 checks passed
@k8s-infra-cherrypick-robot
Copy link
Contributor

@Gacko: new pull request created: #13235

In response to this:

/cherry-pick release-1.12

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-infra-cherrypick-robot
Copy link
Contributor

@Gacko: new pull request created: #13236

In response to this:

/cherry-pick release-1.11

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/docs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants