kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.45k stars 4.88k forks source link

Show the container runtime when running without kubernetes #13432

Closed afbjorklund closed 2 years ago

afbjorklund commented 2 years ago

Currently we hide the container runtime output.

But there should be plenty of room to show it ?

No Kubernetes

😄  minikube v1.25.1 on Ubuntu 20.04
✨  Automatically selected the kvm2 driver. Other choices: virtualbox, ssh
👍  Starting minikube without Kubernetes minikube in cluster minikube
🔥  Creating kvm2 VM (CPUs=2, Memory=3900MB, Disk=20000MB) ...
🏄  Done! minikube is ready without Kubernetes!
╭───────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                       │
│                       💡  Things to try without Kubernetes ...                        │
│                                                                                       │
│    - "minikube ssh" to SSH into minikube's node.                                      │
│    - "minikube docker-env" to point your docker-cli to the docker inside minikube.    │
│    - "minikube image" to build images without docker.                                 │
│                                                                                       │
╰───────────────────────────────────────────────────────────────────────────────────────╯

With Kubernetes

😄  minikube v1.25.1 on Ubuntu 20.04
✨  Automatically selected the kvm2 driver. Other choices: virtualbox, ssh
👍  Starting control plane node minikube in cluster minikube
🔥  Creating kvm2 VM (CPUs=2, Memory=3900MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.23.1 on Docker 20.10.12 ...
    ▪ kubelet.housekeeping-interval=5m
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

This sentence is somewhat weird: "Starting minikube without Kubernetes minikube"

~Probably better off as "Starting virtual machine minikube" (or "container", for KIC) ?~

EDIT: It did say "VM" on the line below, so maybe something else rhyming with node.

👍  Starting node minikube in cluster minikube
🔥  Creating kvm2 VM (CPUs=2, Memory=3900MB, Disk=20000MB) ...

And this one doesn't contain much info: "Done! minikube is ready without Kubernetes!"

~Slightly more useful as "Done! minikube is ready with Docker 20.10.12" instead~

EDIT: Possibly on a separate line, to show the fancy runtime emoji (like that whale)

🐳  Preparing Docker 20.10.12 ...
🏄  Done! minikube is ready without Kubernetes!
afbjorklund commented 2 years ago

Eventually this should tie into provisioning, and output the result of it:

It can either go very quickly, like when the container runtime is pre-installed

Or it can take a while, like when having to download and install packages for it.

afbjorklund commented 2 years ago

This also looks a bit useless:

I0123 12:54:26.754644   60094 preload.go:132] Checking if preload exists for k8s version v0.0.0 and runtime containerd
W0123 12:54:26.953318   60094 preload.go:115] https://storage.googleapis.com/minikube-preloaded-volume-tarballs/preloaded-images-k8s-v16-v0.0.0-containerd-overlay2-amd64.tar.lz4 status code: 404

Can skip the preload, for v0.0.0


This is a separate issue:

MdSahil-oss commented 2 years ago

@afbjorklund Do you think this is good first issue to contribute, if so, can you suggest me the path of changing files as I'm beginner and want to contribute too.

afbjorklund commented 2 years ago

@afbjorklund Do you think this is good first issue to contribute, if so, can you suggest me the path of changing files as I'm beginner and want to contribute too.

Sure, just need to argue a bit about what it should look like. The code is in "node":

https://github.com/kubernetes/minikube/blob/master/pkg/minikube/node/start.go

And some of it (for "kubectl") is hacked straight into the start command itself:

https://github.com/kubernetes/minikube/blob/master/cmd/minikube/cmd/start.go

MdSahil-oss commented 2 years ago

/assign

MdSahil-oss commented 2 years ago

@afbjorklund, if we rename "Starting minikube without Kubernetes minikube" to "Starting node minikube in cluster minikube" , it's good but if we change 🏄 emoji with something else like that 🐳, it will change the minikube status meaning that is already specified by minikube (you can check emojis meaning https://github.com/kubernetes/minikube/blob/master/pkg/minikube/style/style.go).

MdSahil-oss commented 2 years ago

and don't you think ?, Showing container runtime output will be a little bit confusing for beginners.

afbjorklund commented 2 years ago

Showing container runtime output will be a little bit confusing for beginners.

It was supposed to look something like this:

😄  minikube v1.25.1 on Ubuntu 20.04
✨  Automatically selected the kvm2 driver. Other choices: virtualbox, ssh
👍  Starting node minikube in cluster minikube
🔥  Creating kvm2 VM (CPUs=2, Memory=3900MB, Disk=20000MB) ...
🐳  Preparing Docker 20.10.12 ...
🏄  Done! minikube is ready without Kubernetes!

Should hopefully be less confusing, not more ?

MdSahil-oss commented 2 years ago

@afbjorklund, if we rename "Starting minikube without Kubernetes minikube" to "Starting node minikube in cluster minikube" , it's good but if we change surfer emoji with something else like that whale, it will change the minikube status meaning that is already specified by minikube (you can check emojis meaning https://github.com/kubernetes/minikube/blob/master/pkg/minikube/style/style.go).

@afbjorklund What about this ?

klaases commented 2 years ago

Hi @MdSahil-oss, please see @spowelljr's comments on PR #13513 before we can merge.

klaases commented 2 years ago

Hi @MdSahil-oss, just wanted to check if you are still actively working on this issue?

klaases commented 2 years ago

Un-assigning @MdSahil-oss, please feel free to re-assign if still actively working on this issue.

Gimb0 commented 2 years ago

/assign

klaases commented 2 years ago

Hi @afbjorklund, would you mind taking a look at Gimb0's PR to see if this helps display the container runtime data that you were looking for?