-: Alright, my friends.
In this section, we're gonna start the long process
of getting our Kubernetes cluster
over to a production environment.
So step number one is to create a new GitHub repository
that's going to eventually house all of our source code.
Now we have already made a GitHub repository
for our project in the past.
I'm gonna create a totally separate repository
so that there's no confusion
between this Kubernetes stuff and all
of the Elastic Beanstalk stuff that we had done previously.
So I'm going to first navigate to GitHub and then once here,
I'll find the little plus on the top right hand side,
and I'll make a new repository.
Now I'm gonna call this repository Multi-K Eights, like so.
You can call it anything else you might wanna call it.
Totally up to you.
I'm just gonna choose the name Multi-K Eights.
I'm then gonna make sure that the repository is marked
as public, and then I'll click on Create Repository.
Okay, great, so there's my link right there.
I'm gonna copy the link and we'll now create
a local Git repo
and set the remote to be this GitHub repository.
So I'm gonna flip over to my terminal.
Now, quick reminder, you have already created a Git repo
inside of the complex directory earlier in this project
and you had used it to deploy the multi-container
application to Elastic Beanstalk.
So I want you to do a LS-A right now
and if you see inside of your a .git folder
that means that you've already set up a local Git repository
and you do not need to create a new one.
Now I do not have a Git repo inside this folder
so I'm going to now create one with Git in it
and I'll do a Git add and a commit,
like so.
So now I have a Git repository inside of here as well.
I see the .git folder.
Now again, if you already had a .git folder inside
of here, you probably already had a remote setup
for the previous GitHub repository that we had created.
So I want you to do a git remote dash V right now.
Like so
If you run that command and you see something come up
that says, like, origin and the name of a repository next
to it, then you're going to want to delete that remote
and change it over to be the new GitHub repository
that we just created.
So to delete the existing remote, you can run Git remote...
what is it?
Remove origin. There we go.
That's totally off the top of my head here.
So you can run that command and it will delete
the existing remote called origin.
Then to wire it up to our new GitHub repository that we just
created we'll run Git remote ad origin, and then I'll paste
in the link that I just got off of
the GitHub page over here.
So this link right here.
So I'll paste that in and there we go.
So now I can do a Git remote dash V
and I'll see the origin appear with the new repository name.
Now I'm going to do a push to
send all the code that we just added
inside this repo up to GitHub.
So I'll do a Git push origin master like so.
Now, after a second or two, we'll see a little message
here that says the push is complete.
So I'm just gonna wait for that.
Okay, there we go. The push is complete.
So now the last thing I wanna do is flip back
over to GitHub.
I wanna refresh the page and I wanna make sure
that I see all of my work inside this directory here.
Now, you'll notice I got that stupid...
I hate this File DS Store.
It's from when you copy paste stuff around on OSX.
I'm gonna take care of that in just a second
but you should see at least
the client server worker directories
along with the K Eights folder as well
with all of our different config files inside there.
So at this point, please make sure
that you have those three different directories
along with the K Eights folder as well.
If you don't have this then you need to
do a little bit of work on your Git repo.
All right, so let's take a quick pause right here
and we'll continue in the next section.
Our next step is going to be to wire up
the GitHub repository to Travis CI.
So I'll see you in just a moment.