Let's talk about why you might need Kubernetes. 2 2
Now as a review, check back with the earlier 3 3
sections. The first section for Swarm and there's a lecture 4 4
titled Swarm Mode Built-in Orchestration. 5 5
That gives you some basics around the problems that 6 6
orchestration solves and why you might 7 7
need it. I will stress that that at first, 8 8
it's definitely important that you understand what 9 9
orchestration benefits you will need 10 10
in order to deploy your applications, and whether or not 11 11
you even need orchestration to begin with. 12 12
Orchestration is definitely increasing in popularity, but 13 13
it's not the only way to run containers. 14 14
We've talked about using Docker runs here. 15 15
We've talked about Docker Compose. 16 16
We've talked about other platform offerings and services. 17 17
I have customers that still run containers on 18 18
single nodes in AWS without 19 19
orchestration. They use the features of that 20 20
platform to create a similar like abstraction 21 21
as orchestration, where they maybe use auto scaling groups, 22 22
Elastic Load Balancing, and a lot of other things that 23 23
we've all used for over a decade to manage 24 24
our application deployments. 25 25
They have such a refined system that they just don't see a 26 26
lot of benefits out of completely changing all that to 27 27
orchestration. 28 28
Now, most of us will eventually use some form 29 29
of container orchestration because that's really the way 30 30
I think the industry is going, and these are all going to 31 31
be these extra layers running on top of Docker, or 32 32
some other runtime, which is what you've learned throughout 33 33
this course. 34 34
One of the simple formulas I use for whether or not to use 35 35
orchestration, are taking the number 36 36
of servers that I'm going to need for particular 37 37
environment, and then the change rate 38 38
of my applications, or the environment itself, 39 39
and the multiplication of those two really 40 40
equals the benefit of orchestration. 41 41
What I mean by that is that orchestration is designed to 42 42
automate change and monitor 43 43
the state of things and ensure everything is the state you 44 44
expect it to be. 45 45
For instance, apps running in a healthy state. 46 46
When you're starting out, you may only 47 47
need a single server, or just a few servers, and 48 48
if you're not changing your applications very often, let's 49 49
say you're only changing them once a month or less, then 50 50
orchestration, and the effort involved in deploying it, 51 51
managing it, securing it, may be unnecessary 52 52
at your state. Especially if you're a solo developer 53 53
or just a very small team. 54 54
That's where things like Elastic Beanstalk, or 55 55
Heroku, the application deployment platform, that's where 56 56
a lot of those start to shine as alternatives 57 57
to doing your own orchestration. 58 58
Of course, the most common question that I get 59 59
from people once they've figured out that they need 60 60
orchestration, is to decide which one they want. 61 61
Really at this point in 2019, there are 62 62
at least two or three major platforms. 63 63
If you include the Cloud solutions, there might be four 64 64
or five major platforms there. 65 65
The ones I talk about in this course are the top two that 66 66
work everywhere. That's Swarm and Kubernetes. 67 67
Then you have other ones that are specific to Cloud 68 68
platforms, like ECS, which is only on 69 69
AWS, and more traditional offerings 70 70
that have been around a little bit longer like Cloud 71 71
Foundry, or Mesos and Marathon. 72 72
But I think if you're someone who's concerned about running 73 73
containers on premise, and in the Cloud, 74 74
or potentially multicloud, you may not want to go with 75 75
those Cloud specific offerings like ECS 76 76
because those were around before Kubernetes was. 77 77
So, that was sort of a legacy solution that Amazon 78 78
still supports and it's still a neat option, but only if 79 79
you're specific to AWS and that's the only place you ever 80 80
plan to deploy containers. 81 81
For a lot of my customers, and for a lot of my students, 82 82
the choices are usually, I need something that's hybrid. 83 83
Meaning that I can run it in my data center or in 84 84
multicloud. It can't just run in one location 85 85
only. That comes down to usually 86 86
Swarm or Kubernetes as their big choices because those 87 87
are two solutions that are the most popular 88 88
container orchestrators. 89 89
They run on every cloud, and in data centers, 90 90
and even small environments possibly like IoT. 91 91
If you decide on Kubernetes as 92 92
your orchestrator, the next big decision is which 93 93
distribution you're going to use. 94 94
The first part of that is to figure out if you want a Cloud 95 95
managed solution, or if you want to roll your 96 96
own solution with a vendor's product 97 97
that you would install on the servers yourself. 98 98
Common distributions that are vendor supported that you've 99 99
heard me talk about, including Docker Enterprise and 100 100
there's other ones such as Rancher OpenShift from 101 101
Red Hat. Canonical, the Ubuntu company, has 102 102
their own version. 103 103
VMware has their own version. 104 104
PKS as well. 105 105
In fact, there are so many infrastructure and software 106 106
company vendor solutions for Kubernetes now 107 107
that it's a little bit overwhelming. 108 108
I'll give you a link in the resources to a list of the 109 109
Kubernetes certified distributions. 110 110
You want to use one of these because they guarantee that 111 111
the API from Kubernetes is used directly, 112 112
and that it's fully supported. 113 113
So that the ideal case is that you can take 114 114
your workloads and your YAML files that design 115 115
your infrastructure, and you can move those from one 116 116
Kubernetes vendor to another and they should work 117 117
out-of-the-box for most things. 118 118
Now there's another option I'll just mentioned here which 119 119
is to use the raw GitHub upstream version 120 120
of Kubernetes. 121 121
That is what all the distributions are based on. 122 122
For example, if you look upstream and you see 123 123
Kubernetes 1.14 release. 124 124
Then, when you look at a vendor product, you'd be 125 125
interested in which Kubernetes versions they support. 126 126
Usually, vendor products are a few versions behind, 127 127
but nowadays, the race is that they all just 128 128
stay up to date as much as possible. 129 129
So, I tend to see them only one version out of date 130 130
at most times. 131 131
Now, the thing that you get out of vendor solutions, 132 132
besides just that vendor's support options, 133 133
is also bundling other tools with it. 134 134
One of the things about Kubernetes that's a little 135 135
different from Swarm is that it needs a lot of 136 136
things added to it to really make it easy to use 137 137
out-of-the-box. So, you probably, when you get a vendor 138 138
solution, are going to see things like custom 139 139
authentication solutions, custom Web administration, 140 140
and custom networking, just to name a few. 141 141
I will generally recommend to you, 142 142
without knowing any of your requirements, that you probably 143 143
don't need the pure upstream version 144 144
of GitHub's Kubernetes. 145 145
You don't need to clone the repo of Kubernetes 146 146
and run just that. 147 147
Now, it's great for learning. 148 148
In fact, I recommend starting with that as the way to learn 149 149
Kubernetes. But, once you get into vendor solutions, 150 150
those are going to all be a little bit different with 151 151
security, and networking, and other stuff. 152 152
So, it's going to be hard for you to learn one and then 153 153
just assume that the other one acts the same way. 154 154
However, when you start talking about production, I would 155 155
expect that you would try to use one of those vendor 156 156
solutions first because they're going to be easier to 157 157
manage. You're going to have better support options. 158 158
Generally, things will just work better and faster 159 159
out-of-the-box.