Skip to content

fix cluster-info dump error#66652

Merged
k8s-github-robot merged 1 commit into
kubernetes:masterfrom
ChiuWang:clusterinfo_dump
Aug 9, 2018
Merged

fix cluster-info dump error#66652
k8s-github-robot merged 1 commit into
kubernetes:masterfrom
ChiuWang:clusterinfo_dump

Conversation

@ChiuWang
Copy link
Copy Markdown
Contributor

@ChiuWang ChiuWang commented Jul 26, 2018

Which issue(s) this PR fixes :
Fixes #65221

Release note:

fix cluster-info dump error

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 26, 2018
@ChiuWang
Copy link
Copy Markdown
Contributor Author

/assign @juanvallejo

@justinsb justinsb added the sig/cli Categorizes an issue or PR as relevant to SIG CLI. label Jul 26, 2018
@ChiuWang
Copy link
Copy Markdown
Contributor Author

@juanvallejo @deads2k PTAL 😸

@CaoShuFeng
Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 30, 2018
@ChiuWang
Copy link
Copy Markdown
Contributor Author

/test pull-kubernetes-integration

@ChiuWang
Copy link
Copy Markdown
Contributor Author

/test pull-kubernetes-e2e-gce-100-performance

Comment thread pkg/kubectl/cmd/clusterinfo_dump.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should be using our printing stack, not circumventing it via special-cases in individual commands.
The overall problem appears to be that this command is sending internal objects to the printer.
These objects do not have a defined GroupVersionKind, so the printer refuses to print them.

To allow this command to work with the printer, we can re-work this command to work with external versions of objects: https://gist.github.com/juanvallejo/031d20ab40488c98c81b9928c5a5e753 (make sure you are up to date with latest master before applying)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@juanvallejo Thank you for your guidance. Work is done.

@ming19871211
Copy link
Copy Markdown

Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service accounts configuration) or the --apiserver-host param points to a server that does not exist. Reason: Get https://10.96.0.1:443/version: dial tcp 10.96.0.1:443: i/o timeout
Refer to our FAQ and wiki pages for more information: https://github.com/kubernetes/dashboard/wiki/FAQ

@ChiuWang ChiuWang force-pushed the clusterinfo_dump branch 2 times, most recently from 2d79d30 to cf852c7 Compare August 2, 2018 05:12
@juanvallejo
Copy link
Copy Markdown
Contributor

@charrywanganthony Thanks

/lgtm
cc @soltysh for approval

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 2, 2018
Copy link
Copy Markdown
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

Since you touched it, please update the client to use apps/v1

Comment thread pkg/kubectl/cmd/clusterinfo_dump.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I prefer CoreClient.

Comment thread pkg/kubectl/cmd/clusterinfo_dump.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

DaemonSet, ReplicaSet and Deployment are part of apps/v1 since 1.10 at least. It's about time we switch commands to use the GA version.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@charrywanganthony You'd need to switch out extensionsv1client for appsv1client "github.com/openshift/client-go/apps/clientset/versioned/typed/apps/v1"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@juanvallejo WIP but openshift/client-go seems only have function for deployment func (c *AppsV1Client) DeploymentConfigs(namespace string) did i miss something?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@charrywanganthony sorry about that, the actual import path for the appsv1 client is "k8s.io/client-go/kubernetes/typed/apps/v1"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 4, 2018
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Aug 7, 2018
@ChiuWang ChiuWang force-pushed the clusterinfo_dump branch 3 times, most recently from 54c116f to 8aa0e07 Compare August 7, 2018 10:24
@juanvallejo
Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 8, 2018
Copy link
Copy Markdown
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Comment thread pkg/kubectl/cmd/clusterinfo_dump.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similarly AppsClient is the preferred name.

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 9, 2018
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 9, 2018
@ChiuWang
Copy link
Copy Markdown
Contributor Author

ChiuWang commented Aug 9, 2018

@juanvallejo @soltysh done.

@juanvallejo
Copy link
Copy Markdown
Contributor

/lgtm

/test pull-kubernetes-e2e-kops-aws

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 9, 2018
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: charrywanganthony, juanvallejo, soltysh

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

The pull request process is described here

Details 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-github-robot
Copy link
Copy Markdown

/test all [submit-queue is verifying that this PR is safe to merge]

@ChiuWang
Copy link
Copy Markdown
Contributor Author

ChiuWang commented Aug 9, 2018

/test pull-kubernetes-e2e-kops-aws

@k8s-github-robot
Copy link
Copy Markdown

Automatic merge from submit-queue (batch tested with PRs 66652, 67034). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 31d1909 into kubernetes:master Aug 9, 2018
@mkumatag
Copy link
Copy Markdown
Member

I'm not sure how this one got skipped! very important feature in case of sos report.! don't we have any proper testcases to cover this scenario?

@mkumatag
Copy link
Copy Markdown
Member

can someone help to cherrypick this to 1.11 release?

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Aug 23, 2018
k8s-github-robot pushed a commit that referenced this pull request Aug 24, 2018
…66652-upstream-release-1.11

Automatic merge from submit-queue.

Automated cherry pick of #66652: fix cluster-info dump error

Cherry pick of #66652 on release-1.11.

#66652: fix cluster-info dump error

**Release note**:
```release-note
fix cluster-info dump error
```
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. 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.

kubectl cluster-info dump doesn't appear to work after kubeadm install

9 participants