How to install vm with ubuntu image via minikube-kubernetes - linux

I am using minikube to install kubernetes.
This creates a VM with embedded version of linux.
But i want the VM to have a ubuntu operating system. Is there any way to do it?
Earlier i used the command to install minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

It would be very difficult (and not recommended) to use a different ISO to setup a minikube node. You probably want to setup a single node kubernetes cluster. Take a look at the following resources:
https://kubernetes.io/docs/getting-started-guides/ubuntu/local/
https://kubernetes.io/docs/getting-started-guides/ubuntu/manual/

Related

Need to delete minikube from centos7

i deleted minikube using minikube delete --all command
and when type minikube version appears and the command still works
how to delete any thing related to minikube and kubectl also
if you downloaded minikube binary file, just delete the file. minikube working just binary file and don`t use specific dependencies for lib. but minikube use virtlib tool for vm orchestration.
if you delete virtlib and all not usable dependencies on centos, run yum autoremove qemu-kvm libvirt libvirt-python libguestfs-tools virt-install

/lib64/ld-linux-x86-64.so.2: No such file or directory error

Background
I am using docker to do a school project. Specifically, I pulled an ubuntu image and here is the system config:
I then logged into the docker container (ubuntu) and set up elasticsearch. When I try to run
./bin/elasticsearch
I get the following error inside the docker container's terminal
/lib64/ld-linux-x86-64.so.2: No such file or directory
I have two main confusions:
what does that even mean?
How to solve it?
If you are running this on an M1 macbook, it's possible that you are running a native Arm image of ubuntu, instead of the emulated x86 image. If the elasticsearch distribution you are trying to install is for x86_64, then it attempts to link to the x86-64-native ld.so, which of course isn't present on different platforms.
Either install the package for the arm platform specifically if they provide one, or - more likely - run docker explicitly as the emulated x86_64 platform:
docker run --platform linux/x86_64 <image>
For docker-compose, add platform: linux/x86_64 according to the docs
services:
my-app:
platform: linux/x86_64
No idea what you are running in your container but for me, the reason was simply because a package (Prisma https://github.com/prisma/prisma/issues/8478#) did not find openssl packages and installing them on alpine image failed even with openssl manually installed.
It was fixed by switching to slim image and installing openssl with apt-get update && apt-get -y install openssl. I highly recommend not changing your platform since with my M1 the build time increased by 200s using linux/x86_64.
Completing #misnomer answer, I could not even build the image.
If that is the case just add FROM --platform=linux/x86_64 ..., from this source. Ex: FROM --platform=linux/x86_64 python:slim ...

If docker-ce and containerd are installed on Ubuntu 20.04, what CRI does K8s use?

In the official Kubernetes documentation for installing kubeadm found here, it states that "If both Docker and containerd are detected, Docker takes precedence" and if on my Ubuntu 20.04 host I have installed docker-ce docker-ce-cli containerd.io as suggested by the docker install documentation, does K8s talk directly to the containerd component or does it still use the (soon to be deprecated from in tree K8s) dockershim layer?
And if it is the latter, how do I get K8s to talk to containerd directly whilst having the docker cli toolset still available on the host?
This is a community wiki answer based on the solution from the comments and posted for better visibility. Feel free to expand it.
As already mentioned by #mmking: if you don't specify a runtime than Docker will be chosen. You can use the --cri-socket alongside the kubeadm init if you want to change it manually like described in Initializing your control-plane node docs:
(Optional) Since version 1.14, kubeadm tries to detect the container
runtime on Linux by using a list of well known domain socket paths. To
use different container runtime or if there are more than one
installed on the provisioned node, specify the --cri-socket argument
to kubeadm init.

Should I use Docker to create Linux OS within a Linux OS? [duplicate]

This question already has answers here:
How is Docker different from a virtual machine?
(23 answers)
Closed 5 years ago.
I recently started to learn Docker, and know it creates and runs Ubuntu within a container with just a simple command.
docker run -i -t ubuntu:14.04 /bin/bash
I also know that docker-machine uses VirtualBox to create Linux OS in a very handy way.
So what's the difference between them?
So docker run -i -t ubuntu:14.04 /bin/bash uses docker engine to create containers(ubuntu container in this case) and will use your Host OS to manage them. On the other hand docker machine will use virtualBox and create VMs(Linux) which will serve as docker hosts running docker engine on them. There are a few links you can refer to :
https://dougwells.gitbooks.io/docker-notes/content/what_is_docker/what_is_difference_between_docker-machine_and_dock.html
https://docs.docker.com/machine/overview/
https://docs.docker.com/engine/
The first command using docker run is to start a new container. Docker containers can be run anywhere - on your local machine, within a VM (Virtualbox, VMWare etc), in an instance in the cloud, on bare metal or even on your smartphone. All this requires is to have docker installed and running as a daemon / service
docker-machine is a tool used to mimic running docker containers locally using a VM. This is only because earlier versions of docker were not available on MacOS & Windows natively. As such a Linux OS is made available insider a virtual machine with docker installed. On this VM it was possible to run docker commands and docker containers as though it was running docker natively.
You should check out Docker for Mac and Docker for Windows if these are compatible with your setup.

Package manager on the Docker Machine default VM?

I'm developing on OSX using Docker Machine. I used the quickstart terminal to let it create the default VM which is extremely minimal:
In an OS X installation, the docker daemon is running inside a Linux VM called default. The default is a lightweight Linux VM made specifically to run the Docker daemon on Mac OS X. The VM runs completely from RAM, is a small ~24MB download, and boots in approximately 5s.
I want to install dnsmasq, but none of these instructions could work. I expect to come across this kind of problem again, so beyond installing dnsmasq I want to have some tool such as apt-get to be able to easily install things. With so few commands available I don't know how to get started. I have curl, wget, sh, git, and other very basic commands. I don't have any of the following:
apt
apt-get
deb
pkg
pkg_add
yum
make
gcc
g++
python
bash
What can I do? Should I just download a more complete VM such as Ubuntu? My laptop is not very fast so a very lightweight VM was very appealing to me, but this is starting to seem like a bit much.
The docker-machine VM is based on TinyCore. To install extra packages use tce or tce-load, the apt-get counterpart of TinyCore.
A word of warning, you shouldn't treat the docker-machine VM as a regular VM where you install tons of packages and customize. It's only meant to run containers. It's best to keep it that way.

Resources