-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Katacoda platform hosting "hello minikube" could use open alternatives #14228
Comments
This is the version currently deployed:
|
Earlier efforts:Here are some hacks, using vagrant: (it could be changed, to use the "none" driver instead of the "ssh" driver) Eventually the efforts to run kubernetes with containerd and with ubuntu were moved to "lima" project instead: https://github.com/lima-vm/lima/blob/master/examples/k8s.yaml It doesn't have any add-ons, though. Especially, no dashboard. Note: these solutions (vagrant and lima) will also install a VM, similar to minikube VM drivers. The katacoda platform does all the VM setup itself and runs on CP, so it uses the "none" driver. Currently the bare metal drivers have several bugs, that makes them harder to use than needed. Running |
One alternative is killercoda.com |
I think this is the scenario, the image source code and the licensing is unclear. https://github.com/katacoda-scenarios/kubernetes-bootcamp-scenarios At least for https://kubernetes.io/docs/tutorials/kubernetes-basics/ But minikube is not doing the hosting or setup for this, it's part of the k8s.io docs. $ which start.sh
/usr/bin/start.sh
$ cat /usr/bin/start.sh
echo -n "Starting Kubernetes..."
minikube version
minikube start --wait=false
sleep 2
n=0
until [ $n -ge 10 ]
do
(minikube addons enable metrics-server && minikube addons enable dashboard) && break
n=$[$n+1]
sleep 1
done
sleep 1
n=0
until [ $n -ge 10 ]
do
kubectl apply -f /opt/kubernetes-dashboard.yaml &>/dev/null && break
n=$[$n+1]
sleep 1
done
echo "Kubernetes Started"
$ cat .minikube/config/config.json
{
"ShowBootstrapperDeprecationNotification": false,
"WantNoneDriverWarning": false,
"WantReportErrorPrompt": false,
"WantUpdateNotification": false,
"driver": "none",
"kubernetes-version": "v1.20.2"
}$ cat /opt/kubernetes-dashboard.yaml
apiVersion: v1
kind: Namespace
metadata:
labels:
addonmanager.kubernetes.io/mode: Reconcile
kubernetes.io/minikube-addons: dashboard
name: kubernetes-dashboard
selfLink: /api/v1/namespaces/kubernetes-dashboard
spec:
finalizers:
- kubernetes
status:
phase: Active
---
apiVersion: v1
kind: Service
metadata:
labels:
app: kubernetes-dashboard
name: kubernetes-dashboard-katacoda
namespace: kubernetes-dashboard
spec:
ports:
- port: 80
protocol: TCP
targetPort: 9090
nodePort: 30000
selector:
k8s-app: kubernetes-dashboard
type: NodePort |
Here is a vagrant file that handles most things, except for the storage provisioner (automount): Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.provider "virtualbox" do |vb|
vb.cpus = 2
vb.memory = 2048
end
config.vm.provision "shell", inline: <<-SHELL
# docker provisioning
if ! type docker; then curl -sSL https://get.docker.com | sh -; fi
usermod -aG docker vagrant
# minikube requirements
apt-get update
apt-get install -y conntrack
# minikube installation
curl -sSLO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb
# minikube preparation
su vagrant -c "minikube config set driver none"
su vagrant -c "minikube start --download-only"
SHELL
end After doing
Missing:
|
Note that the above will break with v1.24.0, since it doesn't install
It also doesn't install a CNI configuration, so it doesn't work with any other container runtimes.
|
This extra information in the output is not particularly helpful:
(notice that the memory allocation and suggested memory allocation are the same)
(running with fakenode and fakeroot is still error-prone, compared to none and root)
(note that $HOME and /home/vagrant is the same thing, also $USER and vagrant...) Also kubectl and dashboard are inaccessible, outside the node. |
It is not entirely obvious, where the source code for these images (either katacoda or killercoda) are being hosted ? https://github.com/killercoda/scenario-examples
https://github.com/katacoda-scenarios/kubernetes-scenarios
|
It is also possible to use the same vagrant setup, but over-allocate two system containers on the same VM.
This way it will have both CRI and CNI, installed on the nodes. Both nodes will share the system resources. vagrant@ubuntu-focal:~$ minikube start --driver=docker --nodes=2
😄 minikube v1.25.2 on Ubuntu 20.04 (vbox/amd64)
✨ Using the docker driver based on user configuration
🧯 The requested memory allocation of 1983MiB does not leave room for system overhead (total system memory: 1983MiB). You may face stability issues.
💡 Suggestion: Start minikube with less memory allocated: 'minikube start --memory=1983mb'
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
🔥 Creating docker container (CPUs=2, Memory=1983MB) ...
🐳 Preparing Kubernetes v1.23.3 on Docker 20.10.12 ...
▪ kubelet.housekeeping-interval=5m
▪ kubelet.cni-conf-dir=/etc/cni/net.mk
▪ Generating certificates and keys ...
▪ Booting up control plane ...
▪ Configuring RBAC rules ...
🔗 Configuring CNI (Container Networking Interface) ...
🔎 Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟 Enabled addons: default-storageclass, storage-provisioner
👍 Starting worker node minikube-m02 in cluster minikube
🚜 Pulling base image ...
🔥 Creating docker container (CPUs=2, Memory=1983MB) ...
🌐 Found network options:
▪ NO_PROXY=192.168.49.2
🐳 Preparing Kubernetes v1.23.3 on Docker 20.10.12 ...
▪ env NO_PROXY=192.168.49.2
🔎 Verifying Kubernetes components...
💡 kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default Preparing the download cache could be a good idea.
|
Apparently "hello minikube" is not shutting down
Could still be useful with an alternative (more updated?) |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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. |
/remove-lifecycle rotten |
Katacoda (O'Reilly) is shutting down all environments in 2022, including the Kubernetes.io tutorials and images. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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. |
The docs are running a "none" driver installation:
https://kubernetes.io/docs/tutorials/hello-minikube/
It is closing: https://www.oreilly.com/online-learning/leveraging-katacoda-technology.html
It would be nice if people could still run a minikube-based solution, for learning kubernetes ?
Document how to use minikube, in such an environment:
It should allow for running
minikube start
, without any issues.After that,
minikube kubectl
should "just work", out of the box.The text was updated successfully, but these errors were encountered: