►
From YouTube: Running Workloads in Kubernetes [B] - Janet Kuo, Google
Description
Running Workloads in Kubernetes [B] - Janet Kuo, Google
An introduction to built in controllers in Kubernetes for you to run different kinds of workloads.
About Janet Kuo
Janet is a Software Engineer at Google where she works on OSS Kubernetes. She joined the project in June 2015, when she started working at Google. She strives to build the best experience for running workloads in Kubernetes.
Join us for KubeCon + CloudNativeCon in Barcelona May 20 - 23, Shanghai June 24 - 26, and San Diego November 18 - 21! Learn more at https://kubecon.io. The conference features presentations from developers and end users of Kubernetes, Prometheus, Envoy and all of the other CNCF-hosted projects.
A
A
The
answer
is
one
word
you.
You
may
already
know
that
the
answer
is
kubernetes,
so
many
other
systems
with
this
kind
of
politics.
This
usually
usually
means
that
our
team
will
be
flooded
with
alerts
and
they'll
have
a
sense
of
panic
when
they
are
trying
to
figure
out.
How
do
I
reduce
tribute
my
resources
right,
but
with
kubernetes.
A
A
You
can
think
of
kubernetes
as
a
as
a
platform
for
application
patterns.
The
peasants,
like
is
easy,
make
your
applications
easy
to
deploy,
easy
to
run
and
easy
to
keep
running
and
you're.
Also,
here
part
I
mentioned
a
lot.
A
part
is,
if
the
smallest,
the
things
you
need
to
intranet,
excitment,
deploy
or
create
a
part
usually
has
one
container
or
sometimes
multiple
tightly
coupled
containers
and
they're
shared
resources
apart
is
the
single
instance
of
your
application
in
kubernetes.
A
A
A
A
So
today,
I'm
going
to
give
you
an
overview
of
four
most
common
and
general
pattern
in
kubernetes.
They
are
state
first
Salus
like
stainless
pattern
like
West
Brian
web
servers.
A
concrete
example
is,
and
Jack's
or
Comcast
and
faithful
patent
is
things
like
databases,
message
queues
things
like
think
that
means
say,
for
example,
zookeeper,
MongoDB
or
Mexico
and
then
demon,
for
example,
The
Lost
collection
demons
or
the
note1
train
demon,
for
example,
2
and
V
or
Lincoln
T,
and
the
West
one
is
batch
patterns
of
the
parallel
processing
of
your
work
items.
A
So,
let's
talk
about
the
first
pattern:
POS
pattern,
stateless
means
that
you
don't
need
to
keep
persistent
data.
The
state
in
your
workload,
the
controller
for
Salus
application
is
called
deployment.
If
you
want
to
manage
and
skills
Salus
workloads
such
as
your
web
applications,
your
mobile,
backends
or
API
servers,
then
deployment
is
the
controller
for
you.
A
So,
according
to
Cass
Theory,
you
can
only
choose
between
consistency
and
availability
with
there's
Network
partition
and
sailors.
I
mean
deployment
link
towards
availability,
then
consistency,
so
deployment
provides
the
availability
by
creating
multiple
copies
of
the
same
file.
The
parts
are
disposable,
so
if
they
become
unhealthy
I
the
deployment
will
just
kill
it
and
create
a
new
replacement,
and
you
can
also
update
your
deployment
at
a
controlled
rate
without
a
service
outage.
A
A
A
So
I
use
cube,
control
applies
to
creative
service
and
the
service
will,
from
my
nginx
cut
and
I'm
going
to
deploy
this
appointment
and
you
can
see
there
is
replicas
equal
to
3.
That
means
that
the
appointment
will
always
will
create
r32
cuts
and
you
will
always
be
free
and
I
also
went
to
the
quarry
and
the
version
is
179,
so
I
use
queue,
control
applied
to
create
this
appointment
and
on
the
bottom
you
can
see
the
parts
are
created
and
there
are
three
parts
and
now
I
can
access
my
service
using
curl.
A
B
A
B
A
B
A
A
A
So,
back
to
the
light
and
I
just
taught
told
you
about
JLS
playlist
tagging
now
I'm
going
to
talk
about
a
spatial
pattern
for
stateless
applications.
Skill
and
recovery
is
very
easy.
However,
some
of
you,
some
of
your
application,
needs
to
store
data
like
databases,
message,
queues,
cache
and
you
go
running.
The
distributed
stay
for
were
close
like
zookeeper.
A
Each
of
your
faithful
pods
will
need
a
stronger
notion
of
identity,
and,
if
you
remember
what
I
just
told
you
the
part
created
by
deployment,
we
will
not
have
the
same
identity
like
they
have
random
string
up
their
name
right.
So,
after
the
part
being
killed
and
recreated,
they
won't
have
the
same
identity
and
they
will
not
have
to
spend
storage.
A
So
we
need
another
controller
for
this
kind
of
spatial
pattern
and
the
controller
is
called
staple
set.
So,
unlike
deployments,
staple
sets,
links
towards
consistency,
then
availability
stateful
set
also
manage
multiple
parts,
but
each
part
of
our
staple
sets
are
somewhat
similar,
but
slightly
different
because
they
have
unique
identity
and
unique
persistent
storage
with
staple
set.
You
can
also
deploy
and
scale
and
terminate
your
applications
in
order.
So
this
is
safer.
We
want
safety
first
and
it's
also
easier
for
you
to
reason
about
your
staple
applications.
A
So
again,
I'm
going
to
show
you
a
demo
and
if
this
diagram
is
similar
to
what
we
saw
before.
But
if
you
look
closer
visit,
there's
a
pot,
zero
pot,
one
that
I
put
here.
That
means
we
use
again.
We
use
the
index
of
the
pot
identity
so
when
a
cart
being
killed
and
recreated
their
skill
has
the
same
identity
and
space
and.
A
Cluster
and
I
didn't
show
you
the
details
because
they
are
too
long,
but
in
a
nutshell,
I
just
create
a
safe
all
set
to
keeper
and
I
create
a
service
to
front
it,
and
Kozik
map
is
just
the
configuration
for
this
stateful
set
and
in
this
staple
set
I
create
three
reps
of
pot:
that's
the
minimum
requirement
for
zookeeper
cluster
and
then
on
the
bottom.
You
can
see
that
I'm
creating
three
pods,
but
each
part
will
be
created
in
order.
A
A
A
A
A
So
I'll
only
create
recreate
this
part
after
is
terminated
and
I'll
create
a
part
with
this
and
if
it
took
a
while
to
contaminate
because
we
want
graceful
termination
so
now
that
the
left
part
is
being
killed
and
recreated,
let's
make
sure
it's
recreated
and
the
last
step
is
we
read
the
data
from
the
last
part
and
to
see
if
the
data
is
still
there
and
you
can
see
I
get
hello
and
it
returns
me
wrong.
So
my
data
is
persistent,
even
though
I
killed
hot
and
it's
still
there.
A
A
A
A
A
A
So
in
the
previous
three
previous
three
patterns,
all
your
parts
will
be
running
always
and
if
there
are
skills,
they'll
be
restarted
but
and
the
parts
in
jobs
are
different,
they
will
just
run
to
completion
because
you,
you
only
want
to
run
some
some
work
and
you
don't
want
it
to
be
always
running,
and
so
job
is
defined
for
the
parallel
processing
of
related
but
independent
work.
So,
for
example,
it
can
be
the
emails
that
you
want
to
send
or
the
render
to
the
friends
that
you
want
to
render.
A
And
in
this
demo
of
job
I'm
going
to
watch
here
and
do
the
demo
on
the
top
so
on
the
bottom,
I'm
going
to
watch
I'm
going
to
get
the
part
and
the
jobs
and
on
the
top,
I'll
create
a
job.
So
the
job
here
I
specify
parallels
equal
to
three.
That
means
I
want
to
run
at
most
three
parts
in
parallel
at
the
same
time
and
completion
equal
to
ten
means
that
a
110
has
to
be
completed
after
before
I
say
this
job
is
complete
and
in
here
I
run
command.
A
A
And
down
here
you
can
see
that
there
will
be
always
the
three
parts
running
at
a
same
time
and
they're
named
by
my
change,
because
I
might
create
some
hot
and
they
terminate-
and
here
I
only
list
the
pasta
that
are
running
so
the
terminated
part
will
be
will
not
be
here
so
on.
You
can
easily
see
that
there's
always
three
running
and
down
here.
There's
a
list
of
the
jobs
here
and
you
can
see
it's
counting
the
currently
successful
cause.
A
So,
just
to
recap,
I
showed
you
four
controllers
for
four
different
application
patterns.
The
stateless
pattern
you
use
deployment
it
gives
you
availability,
you
can
scale
and
recover
very
easily,
and
you
can
also
update
your
deployment
at
a
controlled
rate
with
our
service
outage
for
a
stateful
pattern.
You
use
people
sets
it
gives
you
consistency
and
it
gives
you
unique
and
sticky
identity
and
persistent
storage.
You
can
also
deploy
and
skill
and
terminate
your
faithful.
A
Your
a
stapl
set
I
mean
your
staple
applications
in
order
for
a
diamond
pattern
you
use
diamond
set,
it
gives
you
one
pot
per
node.
You
can
also
use
no
label
to
control
which
nodes
should
run
my
pod,
and
the
last
pattern
is
that
a
used
job
job
will
create
parts
that's
running
in
parallel
and
run
to
completion
and
I
can
say
how
many
number
of
parts
need
to
complete
in
this
job.
A
So
you
need
to
remember
that
this
pattern
are
just
are
not
the
only
way
that
you
can
run
your
workload
in
kubernetes
they're,
just
the
most
common
and
most
general
patterns
that
are
supported
in
kubernetes
and
most
of
your
work
clothes.
My
fall
under
the
first
two
most
of
your
web
application
will
be
state
based.
A
less
and
you'll
have
database
that
staple
okay.
So
now
you
may
think
that
okay,
this
Oh
sounds
great,
but
where
do
I
start?
How
do
I
move
my
workload
to
kubernetes
and
are
there
some
examples?
A
A
A
Kubernetes
provides
all
the
essential
primitives
for
you
to
write
your
own
controllers,
or,
if
you
don't
want
to
write
your
own
controllers,
you
can
just
use
the
controllers
that
others
write
for
you.
For
example,
there's
elastic
search
operator
or
a
CD
operator.
You
can
take
a
look
at
very
repo
repo.
A
B
A
A
So,
okay
I
hope
you
can
see
this,
but
in
here
we
use
something
called
volume,
creme
templates,
so
you
can
just
say
it's
the
dynamic
provisioning
feature
in
in
the
storage.
So
you
can
just
say:
I
want
a
storage.
You
just
give
me
and
give
me
the
class
equal
to
anything
and
the
staple
sets
will
just
automatically
get
those
persistent
volume
and
those
persistent
long
swim
in
the
staple
pod.