hey i'm cameron mckenzie at cameron mcnz on twitter and i wanted to show you how to install
kubernetes mini cube on ubuntu 20 and even pull a container from docker hub in my case it'll be a
spring boot micro service based container and actually deploy it and run it on mini cube
kubernetes so as you can see i've got a pretty basic installation of ubuntu right here although i
did just install docker so if i do docker version you'll see that i've got docker 20.10.3 installed
and now i want to do a little bit of kubernetes work and in order to do some kubernetes work well
i'm going to install minicube now there's a couple of things i need to do before i install
minicube i'm going to do a pseudo apt-get update and pass in my password and i'll do a little
update there do a little sudo apt get upgrade after that's done as well if i really need to
and then there's a few little tools that you need to install to make sure that
mini cube's going to work and i found that a couple of the tutorials and guidance online
left out a few of these and it was a little bit annoying so i'm going to install these one by one
and with that concluded there's a few things that i want to install here so as i mentioned i
a couple of these things have already been installed i believe when i installed docker so
right now i'm installing socat i'm just going to do demonstrate a install of curl
but that's all been installed already and i believe that when i did the https
installation i had the app transporter there i don't think i've got contract in and this
one you're going to need if you do some port forwarding so that one's important
and that was just so you saw a contract there and then finally i'm going to install a virtual box
and we'll do this with the pseudo app install virtual box right there
and so now it's time to actually just download go and download minicube so that's the next
step here so i'm going to paste in this url do the wget on the minicube latest release
and so that's going to do a little bit of a download there once the download
is complete i'm actually going to copy that file to user local bin mini cube
and so i do this command sudo copy mini cube linux amd64 to this mini cube directory and then
of course we want to have rights to be able to execute that file so after it's copied i need to
change the user rights to it so that we can actually execute that
and now let's go take a look and see what the version of minicube that's running is
and it says hey it's mini cube version 1.17 so that all looks pretty good let's get
kubernetes in here cube control and so we need the component that's going to control our mini cube
and so we do a pseudo curl on the cube control so we get that locally that'll just take a minute
take a little bit of a look at the version that we've got there oh and it looks like i
got a little ahead of myself there i got to do it change mod command first and then make sure
there's a pseudo change mod command there and then move this file into user local bin cube control
so i'll do a little move next so there we go we've got that somewhere that we can run it and interact
with it and now it's time to do the sudo hey cubecontrol what version are you running there and
it's going to tell us that well let's pull from git 1.20.2 so 2021 build date looks like we've got
the latest there so why don't we actually go and start mini cube so the next step is this do sudo
mini cube start and say no vm driver so dash dash vm driver equals none this will start things up
and there we go we now have cube control up and configured so you can grab a little bit of info
at uh cube control cluster info so we can see that it's running there let's see what
kind of pod information we've got by passing in sudo cube control get pod and we've got nothing
in the default namespace but that kind of makes sense to me there so why don't we do something a
little bit more interesting let's take a look at what we've got in terms of deployments it
wouldn't be it'd be nice to actually kind of maybe deploy a resource or not so we don't
have any deployments there we can look at some events i don't know we can look at the config
so this is all interesting i do have some docker images available so i'm going to take a look at
some of my docker images here you notice that a number of docker images have been brought
locally one of the images that i've got is cameron mcnz rock paper spring so i was thinking i might
actually try to go ahead and deploy that so i'm going to open up a new terminal window
and see if i can't deploy that particular container onto this local mini cube so
first step here is to go in and create a deployment so i'm going to go
sudo cube control create deployment rps node stands for rock paper scissors and
the image is cameron mckenzie rock paper spring which you can see is right up there
and that is created you can take a look at the pods that are created and associated with it so
we've got one there associated with rps take a look at the con fig as well if we
really wanted to i think i'll skip over that let's expose that on port
8080 so we'll expose the deployment so that we can actually gain access to it
and of course you have to spell these things correctly so that's q control ctl
so there we go we've got the node exposed and then we do a little bit
of port forwarding so we map port 7070 to port 8080 pseudo cube control port forward
and if we come over to our browser and go to localhost in this case it's 7070 index.html
we now get our rock paper scissors application this is the same one that i deployed on the
installation of docker in a previous tutorial but now we've got it all wrapped up and running
through mini cube and cube control and there you go that's how you install mini cube kubernetes
on ubuntu 20. and there you go that's how easy it is to install kubernetes mini cube on your ubuntu
20 workstation now if you enjoyed that tutorial head over to theserverside.com
i'm the editor in chief over there lots of great tutorials on ubuntu kubernetes docker
devops you name it if you're interested in my personal antics you can always
follow me on twitter cameronmcnz and subscribe on the youtube