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

Add --no-kubernetes flag to start minikube without kubernetes #12848

Merged
merged 20 commits into from
Nov 4, 2021

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented Nov 2, 2021

based on a survery comment that asked they wish they could start minikbue without kubernetes

$ time mk start --no-kubernetes
😄  minikube v1.24.0-beta.0 on Darwin 11.6 (arm64)
✨  Automatically selected the docker driver
👍  Starting minikube without Kubernetes minikube in cluster minikube
🚜  Pulling base image ...
🔥  Creating docker container (CPUs=2, Memory=1988MB) ...
🏄  Done! minikube is ready without Kubernetes!
╭─────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                         │
│                        💡  Things to try without Kubernetes ...                         │
│                                                                                         │
│    - "minikube ssh" to SSH into minikube's node.                                        │
│    - "minikube docker-env" to build images by pointing to the docker inside minikube    │
│    - "minikube image" to build images without docker                                    │
│                                                                                         │
╰─────────────────────────────────────────────────────────────────────────────────────────╯

real    0m7.277s
user    0m2.730s
sys     0m1.320s

$ mk profile list


|----------|-----------|---------|--------------|------|---------|---------|-------|
| Profile  | VM Driver | Runtime |      IP      | Port | Version | Status  | Nodes |
|----------|-----------|---------|--------------|------|---------|---------|-------|
| minikube | docker    | docker  | 192.168.49.2 | 8443 | N/A     | Stopped |     1 |
|----------|-----------|---------|--------------|------|---------|---------|-------|

list of the procs running inside minikube

docker@minikube:~$ ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.3  0.4  21380  9368 ?        Ss   22:47   0:00 /sbin/init
root         174  0.0  0.3  28468  7076 ?        S<s  22:47   0:00 /lib/systemd/systemd-journald
message+     186  0.0  0.1   6812  3184 ?        Ss   22:47   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root         189  1.0  2.0 1481208 41376 ?       Ssl  22:47   0:00 /usr/bin/containerd
root         196  0.0  0.3  12212  6468 ?        Ss   22:47   0:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
root         464  0.1  3.3 1437968 68904 ?       Ssl  22:47   0:00 /usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --default-ulimit=nof
root         631  0.0  0.3  12324  6344 ?        Ss   22:48   0:00 sshd: docker [priv]
docker       633  0.0  0.1  12324  2996 ?        S    22:48   0:00 sshd: docker@pts/1
docker       634  0.0  0.1   3876  3108 pts/1    Ss   22:48   0:00 -bash
docker       642  0.0  0.1   5468  2400 pts/1    R+   22:48   0:00 ps aux

closes #12845
TODO it should close #12844

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 2, 2021
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 2, 2021
@medyagh medyagh changed the title add --no-kubernetes flag to start minikube without kubernetes Add --no-kubernetes flag to start minikube without kubernetes Nov 2, 2021
@afbjorklund
Copy link
Collaborator

This would probably make more sense when using a --vm driver, if it says "without docker" ?

Also the minikube docker-env command depends on the container runtime being set to docker

register.Reg.SetStep(register.Done)
out.Step(style.Ready, "Done! minikube is ready without Kubernetes!")
out.BoxedWithConfig(box.Config{Py: 1, Px: 4, Type: "Round", Color: "Green"}, style.Tip, "Things to try without Kubernetes ...", `- "minikube ssh" to SSH into minikube's node.
- "minikube docker-env" to build images by pointing to the docker inside minikube
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to check for the runtime being docker, so needs a parameter with the current setting

Copy link
Member Author

Choose a reason for hiding this comment

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

I was actualy aware of this I was gonna make a good first issue out of this for joey

cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 3, 2021
@medyagh
Copy link
Member Author

medyagh commented Nov 3, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Nov 3, 2021
@medyagh
Copy link
Member Author

medyagh commented Nov 3, 2021

@afbjorklund thanks for the review, addressed the comments and created a good first issue #12857

test/integration/no_kubernetes.go Outdated Show resolved Hide resolved
test/integration/no_kubernetes.go Outdated Show resolved Hide resolved
test/integration/no_kubernetes.go Outdated Show resolved Hide resolved
test/integration/no_kubernetes.go Outdated Show resolved Hide resolved
test/integration/no_kubernetes.go Outdated Show resolved Hide resolved
test/integration/no_kubernetes.go Outdated Show resolved Hide resolved
test/integration/no_kubernetes.go Outdated Show resolved Hide resolved
medyagh and others added 7 commits November 3, 2021 14:24
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
@medyagh
Copy link
Member Author

medyagh commented Nov 3, 2021

/ok-to-test

1 similar comment
@medyagh
Copy link
Member Author

medyagh commented Nov 3, 2021

/ok-to-test

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 48.2s    | 47.4s               |
| enable ingress | 31.5s    | 32.0s               |
+----------------+----------+---------------------+

Times for minikube (PR 12848) start: 46.0s 47.1s 47.3s 48.8s 47.7s
Times for minikube start: 50.5s 47.7s 47.2s 47.6s 48.1s

Times for minikube ingress: 32.3s 30.9s 31.8s 30.8s 31.8s
Times for minikube (PR 12848) ingress: 31.3s 32.4s 31.8s 32.8s 31.8s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 21.8s    | 21.9s               |
| enable ingress | 28.1s    | 28.7s               |
+----------------+----------+---------------------+

Times for minikube start: 22.8s 21.7s 21.4s 21.5s 21.5s
Times for minikube (PR 12848) start: 21.3s 22.0s 22.3s 22.1s 22.0s

Times for minikube ingress: 27.4s 26.4s 34.0s 25.9s 26.5s
Times for minikube (PR 12848) ingress: 27.4s 26.4s 28.0s 34.0s 27.4s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 40.8s    | 43.5s               |
| enable ingress | 28.9s    | 30.8s               |
+----------------+----------+---------------------+

Times for minikube ingress: 28.4s 32.5s 32.4s 18.5s 32.9s
Times for minikube (PR 12848) ingress: 32.9s 27.5s 32.5s 32.9s 28.4s

Times for minikube start: 30.5s 43.3s 43.6s 43.6s 43.1s
Times for minikube (PR 12848) start: 43.4s 43.8s 43.2s 42.4s 44.9s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
KVM_Linux TestSkaffold (gopogh) 0.00 (chart)
Docker_Linux_containerd TestStartStop/group/old-k8s-version/serial/Pause (gopogh) 5.71 (chart)
Docker_Windows TestNetworkPlugins/group/false/DNS (gopogh) 20.33 (chart)
Docker_Windows TestNetworkPlugins/group/kindnet/Start (gopogh) 30.89 (chart)
Docker_Windows TestNetworkPlugins/group/calico/NetCatPod (gopogh) 52.38 (chart)
Docker_Windows TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 72.36 (chart)
Docker_Windows TestNetworkPlugins/group/kubenet/DNS (gopogh) 79.51 (chart)
Docker_Windows TestNetworkPlugins/group/bridge/DNS (gopogh) 80.49 (chart)
Docker_Linux_containerd TestScheduledStopUnix (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/RestartStopped (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/StartWithMountFirst (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/StartWithMountSecond (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/Stop (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/VerifyMountFirst (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/VerifyMountPostDelete (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/VerifyMountPostStop (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/VerifyMountSecond (gopogh) 100.00 (chart)
Docker_Windows TestPause/serial/VerifyDeletedResources (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/PingHostFrom2Pods (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/RestartKeepsNodes (gopogh) 100.00 (chart)
Hyper-V_Windows TestRunningBinaryUpgrade (gopogh) 100.00 (chart)
Hyper-V_Windows TestStoppedBinaryUpgrade/Upgrade (gopogh) 100.00 (chart)

To see the flake rates of all tests by environment, click here.

cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Show resolved Hide resolved
medyagh and others added 2 commits November 4, 2021 11:09
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, spowelljr

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

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 46.4s    | 46.5s               |
| enable ingress | 31.0s    | 31.8s               |
+----------------+----------+---------------------+

Times for minikube start: 47.5s 46.4s 46.4s 45.8s 45.7s
Times for minikube (PR 12848) start: 47.0s 46.4s 46.5s 46.0s 46.4s

Times for minikube ingress: 30.8s 31.2s 30.2s 31.3s 31.8s
Times for minikube (PR 12848) ingress: 31.7s 31.3s 30.9s 30.4s 34.8s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 20.9s    | 21.2s               |
| enable ingress | 28.7s    | 28.6s               |
+----------------+----------+---------------------+

Times for minikube start: 20.8s 20.7s 20.8s 21.0s 21.1s
Times for minikube (PR 12848) start: 20.8s 20.6s 20.8s 20.9s 22.6s

Times for minikube ingress: 27.9s 27.4s 26.5s 27.4s 34.4s
Times for minikube (PR 12848) ingress: 26.4s 28.5s 25.9s 27.4s 34.9s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 40.6s    | 41.6s               |
| enable ingress | 26.1s    | 32.6s               |
+----------------+----------+---------------------+

Times for minikube ingress: 29.4s 32.9s 28.9s 19.4s 19.9s
Times for minikube (PR 12848) ingress: 32.9s 45.4s 32.9s 32.9s 18.9s

Times for minikube start: 28.9s 43.2s 43.0s 43.8s 43.9s
Times for minikube (PR 12848) start: 43.0s 35.4s 43.8s 42.5s 43.4s

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 47.9s    | 47.7s               |
| enable ingress | 32.9s    | 32.0s               |
+----------------+----------+---------------------+

Times for minikube ingress: 31.4s 33.9s 36.8s 31.8s 30.8s
Times for minikube (PR 12848) ingress: 31.3s 31.3s 32.3s 33.5s 31.3s

Times for minikube start: 51.6s 47.2s 46.5s 46.4s 47.8s
Times for minikube (PR 12848) start: 47.3s 48.6s 47.7s 47.1s 47.9s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 22.4s    | 22.9s               |
| enable ingress | 28.3s    | 27.3s               |
+----------------+----------+---------------------+

Times for minikube start: 22.1s 22.2s 22.1s 22.0s 23.5s
Times for minikube (PR 12848) start: 22.7s 23.4s 22.9s 23.0s 22.4s

Times for minikube ingress: 34.0s 26.4s 28.0s 27.0s 26.0s
Times for minikube (PR 12848) ingress: 25.4s 27.5s 30.5s 26.5s 26.5s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 43.6s    | 44.1s               |
| enable ingress | 25.4s    | 31.1s               |
+----------------+----------+---------------------+

Times for minikube start: 43.9s 43.8s 43.0s 43.8s 43.2s
Times for minikube (PR 12848) start: 44.0s 44.4s 44.3s 43.8s 43.8s

Times for minikube ingress: 28.0s 18.6s 25.0s 33.0s 22.6s
Times for minikube (PR 12848) ingress: 32.9s 34.4s 36.9s 18.5s 32.5s

@kubernetes kubernetes deleted a comment from minikube-pr-bot Nov 4, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 47.5s    | 46.8s               |
| enable ingress | 32.8s    | 33.6s               |
+----------------+----------+---------------------+

Times for minikube start: 47.6s 47.5s 47.4s 46.8s 48.2s
Times for minikube (PR 12848) start: 47.5s 46.1s 46.1s 47.2s 46.8s

Times for minikube ingress: 32.8s 31.2s 31.8s 32.4s 35.8s
Times for minikube (PR 12848) ingress: 32.8s 31.8s 31.3s 32.3s 39.8s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 22.0s    | 21.8s               |
| enable ingress | 31.5s    | 31.9s               |
+----------------+----------+---------------------+

Times for minikube start: 21.7s 22.2s 22.0s 21.8s 22.4s
Times for minikube (PR 12848) start: 20.9s 21.4s 23.0s 21.8s 21.9s

Times for minikube (PR 12848) ingress: 36.4s 26.9s 34.5s 27.5s 34.4s
Times for minikube ingress: 32.4s 34.4s 27.5s 36.4s 27.0s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12848) |
+----------------+----------+---------------------+
| minikube start | 40.3s    | 39.9s               |
| enable ingress | 27.3s    | 33.9s               |
+----------------+----------+---------------------+

Times for minikube ingress: 29.4s 19.9s 32.9s 25.5s 28.4s
Times for minikube (PR 12848) ingress: 34.9s 18.9s 40.9s 37.9s 36.9s

Times for minikube start: 31.7s 44.8s 43.5s 37.5s 43.9s
Times for minikube (PR 12848) start: 25.8s 43.7s 43.1s 43.8s 43.3s

@medyagh medyagh merged commit 94c74a2 into kubernetes:master Nov 4, 2021
@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Hyper-V_Windows TestNoKubernetes/serial/Start (gopogh) n/a
Docker_Linux_containerd TestRunningBinaryUpgrade (gopogh) 1.99 (chart)
Docker_Linux TestStartStop/group/newest-cni/serial/Pause (gopogh) 4.00 (chart)
KVM_Linux_containerd TestRunningBinaryUpgrade (gopogh) 5.59 (chart)
Docker_Linux_containerd TestFunctional/serial/LogsFileCmd (gopogh) 5.96 (chart)
Docker_Linux_containerd TestStoppedBinaryUpgrade/MinikubeLogs (gopogh) 6.67 (chart)
Docker_Linux_containerd TestStoppedBinaryUpgrade/Upgrade (gopogh) 7.33 (chart)
Docker_Linux TestFunctional/serial/ComponentHealth (gopogh) 9.33 (chart)
Docker_Linux_containerd TestScheduledStopUnix (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/PingHostFrom2Pods (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/RestartKeepsNodes (gopogh) 100.00 (chart)
Hyper-V_Windows TestRunningBinaryUpgrade (gopogh) 100.00 (chart)
Hyper-V_Windows TestStoppedBinaryUpgrade/Upgrade (gopogh) 100.00 (chart)

To see the flake rates of all tests by environment, click here.

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Hyper-V_Windows TestNoKubernetes/serial/StartNoArgs (gopogh) n/a
Docker_Windows TestFunctional/parallel/ImageCommands/ImageLoadFromFile (gopogh) 0.00 (chart)
Docker_Windows TestStartStop/group/newest-cni/serial/SecondStart (gopogh) 3.82 (chart)
Docker_Windows TestStartStop/group/newest-cni/serial/VerifyKubernetesImages (gopogh) 3.82 (chart)
Docker_Windows TestNetworkPlugins/group/auto/DNS (gopogh) 6.20 (chart)
KVM_Linux_containerd TestPause/serial/SecondStartNoReconfiguration (gopogh) 10.49 (chart)
Docker_Windows TestStartStop/group/newest-cni/serial/Pause (gopogh) 15.27 (chart)
Docker_Windows TestNetworkPlugins/group/kindnet/Start (gopogh) 30.53 (chart)
Docker_Windows TestNetworkPlugins/group/custom-weave/Start (gopogh) 70.23 (chart)
Docker_Windows TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 71.76 (chart)
Docker_Windows TestNetworkPlugins/group/kubenet/DNS (gopogh) 78.46 (chart)
Docker_Windows TestNetworkPlugins/group/bridge/DNS (gopogh) 79.23 (chart)
Docker_Windows TestNetworkPlugins/group/calico/Start (gopogh) 82.44 (chart)
Docker_Linux_containerd TestScheduledStopUnix (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/RestartStopped (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/StartWithMountFirst (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/StartWithMountSecond (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/Stop (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/VerifyMountFirst (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/VerifyMountPostDelete (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/VerifyMountPostStop (gopogh) 100.00 (chart)
Docker_Windows TestMountStart/serial/VerifyMountSecond (gopogh) 100.00 (chart)
Docker_Windows TestPause/serial/VerifyDeletedResources (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/PingHostFrom2Pods (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/RestartKeepsNodes (gopogh) 100.00 (chart)
Hyper-V_Windows TestRunningBinaryUpgrade (gopogh) 100.00 (chart)
Hyper-V_Windows TestStoppedBinaryUpgrade/Upgrade (gopogh) 100.00 (chart)

To see the flake rates of all tests by environment, click here.

@dobegor
Copy link

dobegor commented Nov 19, 2021

@medyagh Awesome thanks for this! This is super helpful for my workflows.
BTW I've never seen a survey comment (that was mine!) being addressed so quickly and precisely. ❤️

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add new flag --no-kubernetes add FAQ how to turn off kubernetes part of minikube (to use it just for docker)
7 participants