Skip to content

Conversation

@afbjorklund
Copy link
Collaborator

We only want to match the kubectl version with it

Closes #10717

BEFORE

$ kubectl version --client --output=json
🤷  The control plane node must be running for this command
👉  To start a cluster, run: "minikube start"

AFTER

$ kubectl version --client --output=json
{
  "clientVersion": {
    "major": "1",
    "minor": "20",
    "gitVersion": "v1.20.2",
    "gitCommit": "faecb196815e248d3ecfb03c680a4507229c2a56",
    "gitTreeState": "clean",
    "buildDate": "2021-01-13T13:28:09Z",
    "goVersion": "go1.15.5",
    "compiler": "gc",
    "platform": "linux/amd64"
  }
}

We only want to match the kubectl version with it
@afbjorklund afbjorklund requested review from medyagh and prezha March 6, 2021 08:50
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 6, 2021
@k8s-ci-robot k8s-ci-robot requested review from RA489 and tstromberg March 6, 2021 08:50
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 6, 2021
@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Mar 6, 2021

Still not fully fixed, since mustload will abort if there is no config:

$ kubectl version --client
* Profile "minikube" not found. Run "minikube profile list" to view all profiles.
  - To start a cluster, run: "minikube start

Maybe it should just have used constants.DefaultKubernetesVersion

The "mustload" module will abort without a profile
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.

how about adding an integration test for this ? so on a NOT running minikube profile (maybe start with --dry-run) and then try kubectl on it ? similar to the kubectl subtest in functional test?

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

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

@medyagh medyagh merged commit 05bc047 into kubernetes:master Mar 10, 2021
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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

website/handbook: don't advise users to create a symbolic link to minikube’s binary named ‘kubectl’

3 participants