Skip to content
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

fixed metrics-server and added integration tests #5932

Merged
merged 1 commit into from
Nov 25, 2019
Merged

fixed metrics-server and added integration tests #5932

merged 1 commit into from
Nov 25, 2019

Conversation

govargo
Copy link
Contributor

@govargo govargo commented Nov 16, 2019

What type of PR is this?

/kind bug

What this PR does / why we need it:

The metrics server haven't worked since minikube v1.5.x~ due to changing kubelet version.
This PR fixes the metrics server to be able to work correctly.

Which issue(s) this PR fixes:

Fixes #5859

Does this PR introduce a user-facing change?

Yes.
This PR fixes bug in order to the metrics server addons works successfully.

Before this PR, the metrics server fails because it cannot connect to kubelet

I1107 10:40:32.667494       1 heapster.go:71] /metrics-server --source=kubernetes.summary_api:''
I1107 10:40:32.667545       1 heapster.go:72] Metrics Server version v0.2.1
I1107 10:40:32.667715       1 configs.go:61] Using Kubernetes client with master "https://10.96.0.1:443" and version
I1107 10:40:32.667723       1 configs.go:62] Using kubelet port 10255
I1107 10:40:32.668514       1 heapster.go:128] Starting with Metric Sink
I1107 10:40:33.181569       1 serving.go:308] Generated self-signed cert (apiserver.local.config/certificates/apiserver.crt, apiserver.local.config/certificates/apiserver.key)
I1107 10:40:33.326747       1 heapster.go:101] Starting Heapster API server...
[restful] 2019/11/07 10:40:33 log.go:33: [restful/swagger] listing is available at https:///swaggerapi
[restful] 2019/11/07 10:40:33 log.go:33: [restful/swagger] https:///swaggerui/ is mapped to folder /swagger-ui/
I1107 10:40:33.327930       1 serve.go:85] Serving securely on 0.0.0.0:443
E1107 10:41:05.007656       1 summary.go:97] error while getting metrics summary from Kubelet minikube(192.168.64.44:10255): Get http://192.168.64.44:10255/stats/summary/: dial tcp 192.168.64.44:10255: getsockopt: connection refused

After this PR, the metrics server works successfully via kubernetes service

I1107 10:40:32.667494       1 heapster.go:71] /metrics-server --source=kubernetes.summary_api:''
I1107 10:40:32.667545       1 heapster.go:72] Metrics Server version v0.2.1
I1107 10:40:32.667715       1 configs.go:61] Using Kubernetes client with master "https://10.96.0.1:443" and version
I1107 10:40:32.667723       1 configs.go:62] Using kubelet port 10255
I1107 10:40:32.668514       1 heapster.go:128] Starting with Metric Sink
I1107 10:40:33.181569       1 serving.go:308] Generated self-signed cert (apiserver.local.config/certificates/apiserver.crt, apiserver.local.config/certificates/apiserver.key)
I1107 10:40:33.326747       1 heapster.go:101] Starting Heapster API server...
[restful] 2019/11/07 10:40:33 log.go:33: [restful/swagger] listing is available at https:///swaggerapi
[restful] 2019/11/07 10:40:33 log.go:33: [restful/swagger] https:///swaggerui/ is mapped to folder /swagger-ui/
I1107 10:40:33.327930       1 serve.go:85] Serving securely on 0.0.0.0:443

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 16, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @govargo. 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 16, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: govargo
To complete the pull request process, please assign josedonizetti
You can assign the PR to them by writing /assign @josedonizetti in a comment when ready.

The full list of commands accepted by this bot can be found 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 added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 16, 2019
@govargo
Copy link
Contributor Author

govargo commented Nov 16, 2019

/assign @josedonizetti

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@codecov-io
Copy link

Codecov Report

Merging #5932 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5932   +/-   ##
=======================================
  Coverage   36.09%   36.09%           
=======================================
  Files         110      110           
  Lines        8208     8208           
=======================================
  Hits         2963     2963           
  Misses       4854     4854           
  Partials      391      391

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

PR Looks promising thanks for fixing it

@medyagh
Copy link
Member

medyagh commented Nov 16, 2019

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 16, 2019
@medyagh medyagh changed the title Fix not working the metrics-server since minikube v1.5.x~ fixed metrics-server and added integration tests Nov 25, 2019
@medyagh
Copy link
Member

medyagh commented Nov 25, 2019

Thank you for fixing it and also adding an test for it so we dont break it in the future ! this is good work @govargo

@medyagh medyagh merged commit 4ef2c6d into kubernetes:master Nov 25, 2019
@govargo govargo deleted the fix-not-working-metrics-server branch March 6, 2020 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metrics-server doesn't seem to work in 1.5.x
7 participants