►
From YouTube: OpenShift Coffee Break - Operators Series: Operator SDK
Description
Get your espresso ready for the OpenShift Coffee Break as we kick-off our new series on how to write Operators on Kubernetes! Today we welcome Dario Tranchitella, Kubernetes Engineer at Clastix, that will walk us through Operator SDK and how to create Kubernetes Operators.
Twitch: https://red.ht/twitch
A
B
B
A
Oh
nice
cup
today
we
have
a
special
guest,
but
before
presenting
our
special
guest
and
our
topic,
please
enjoy
your
coffee,
because
this
is
the
open
cheese,
coffee
break
so
welcome
to
dario
tranquitela.
That
will
kick
off
our
new
series
about
how
to
ride
an
operator
on
kubernetes
hi
dario.
How
are
you.
A
So
why
we
invited
that
or
the
people
may
think
how,
while
you
invite
random
people
from
the
community
and
and
they
they
start
talking
about
everything
dalio
is
experienced,
passionate
about
kubernetes
operators
and
actually
it
wrote
an
operator
using
operator
sdk.
So
that's
why
we
invited
today
him
to
share
his
experience
with
this
tool
and
also
to
explain
us
a
little
bit
how
what
is
an
operator,
why
we
should
write
an
operator
on
kubernetes
and
how
we
can
make
production
grade
operator
that
I
said
production
word.
A
So
folks,
let
me
try
if
our
macros
in
the
chat
works.
I'm
writing!
Oh,
that
works
also
from
here.
So
you
see
in
the
chat
on
your
right.
If
you
are
from
youtube
or
twitch
you,
we
use
the
chat
to
send
the
question
to
the
to
the
people
in
our
show.
So
if
you
have
any
question
during
the
show,
please
send
in
the
chat
we
will
send
all
the
questions
to
dario
and
that
in
need
to
also
need
to
reply
live
of
course,
and
dario
is
here.
A
Terror
and
andrea
also
for
live
demos,
because
this
is
mandatory
for
this
show
as
usual.
Today
we
don't
have
jafar's.
Jafar
today
was
a
busy.
We
will
have
it
next,
the
next
wednesday.
So
the
first
big
news
folks,
is
that
the
openshift
coffee
break
now
goes
weekly.
If
you
look
at
the
openshift
calendar
and
I'm
sending
the
chat
soon,
you
will
see
that
now
our
we
are
weekly
and
we
have
a
very
cool
schedule.
There's
the
operator
new
operator
series
there,
the
database
as
a
service
series.
A
We
have
lots
of
people
the
next
time
we
will
have
the
red
hack
fest
winner,
so
we're
really
excited
to
to
be
kind
of
promoted
to
a
weekly
show
and
after
this
wording,
dario
terror.
Andrea.
Do
we
want
to
start
from
the
basis?
So
what
is
a
kubernetes
operator.
A
We
we
can
check,
we
can.
We
can
rise
this
concern,
but
I
don't
think
so
so
dario
coming
back
to
the
to
the
topic.
What
is
an
operator.
D
D
When
you
deploy
a
service
account
when
you
deploy
a
role,
binding
and
so
on
and
so
forth,
there
is
a
controller
that
is
doing
all
the
magic.
So
when
you
create
the
service
account,
you
are
going
to
get
the
secret
with
all
this
stuff
containing
it.
So
essentially
there
is
a
controller,
but
I
wouldn't
say
that
an
operator
is
just
a
simple
controller.
Okay.
D
Why?
This?
Because
we
have
always
to
remember
that
terminology
is
really
important.
When
I
operate
the
cluster,
I'm
an
operator,
okay,
it
means
that
I
know
all
this
stuff
that
is
going
on
inside
the
cluster.
I
know
the
business
logic,
all
the
moving
parts,
and
it
means
essentially
that
I'm
creating
all
the
domains,
logic,
all
my
business
logic
from
the
operator
side.
So
from
the
human
side,
inside
an
application
that
could
be
a
go
operator,
it
could
be
a
helm
operator,
an
ansible
operator
and
so
on
and
so
forth.
D
Whatever
you
want
so
essentially,
I
will
say
that
the
operator
is
the
translation
of
a
human
form
in
a
binary
form
of
all
the
cluster
management.
So
it's
something
more
in
advance
than
a
simple
controller
deal
with
that.
A
It's
good
that
you
mentioned
the
word
controller.
I
think
dalio.
We
need
to
understand
that
kind
of
kubernetes
kubernetes
internals.
Can
we
can
you
explain
to
to
us
to
the
audience?
What
is
this
concept
of
controller?
Because
I
think
this
is
really
important
to
understand.
D
Sure
sure,
let's
go
from
the
basics,
so
when
we
spawn
a
part
well,
let's
start
from
the
beginning,
so
I
would
like
to
spawn
an
application
on
my
cluster
yeah.
I
can
do
that
in
many
ways
I
can
create
a
demon
set.
I
can
create
a
deployment.
Sometimes
all
the
hello
world
examples
says
that
okay,
you
have
to
deploy
your
deployment,
so
it's
much
easier.
D
So
when
we
deploy
deployment,
sorry
for
the
word
stroke,
essentially,
we
are
ending
up
with
multiple
resources.
The
final
effect,
the
final
result
is
going
to
be
appalled
inside
the
namespace,
but
that
part
is
a
direct
consequence
of
a
replica
set.
D
So
when
we
create
the
deployment
we
are
getting
a
replica
set
and
then
the
replica
set
is
creating
the
part,
it
means
that
from
the
kubernetes
control
plane
perspective,
we
have
several
components.
We
all
know
that
we
got
scd
and
hd
is
our
her,
because
we
are
containing
all
the
information
about
the
cluster
state.
D
Then
we
got
the
api
server,
so
the
rest
api
that
we
are
using
to
interact
with
the
control
plane.
We
got
the
scheduler
and
then
we
got
also
a
component
that
is
named
controller
manager
and
this
controller
manager
is
a
huge
monolith.
Full
of
controllers
and
all
these
controllers
are
watching
for
some
actions.
So
when
we
are
creating
a
resource
in
our
hcd
or
I
would
say
in
our
backing
storage,
these
controllers
are
going
to
take
these
requests
and
translating
in
other
resources.
D
So
when
we
create
the
deployment,
the
controller
deployment
is
going
to
create
the
replica
set
and
the
replica
set
is
going
to
create
finally
deposed.
So
these
are
a
sort
of
binaries,
I
would
say,
not
operator,
because
otherwise
we
could
create
some
confusion
there,
but
they
are
watching
for
some
resources
and
applying
to
the
desired
state.
So
translating
from
the
imperative
way
of
saying,
I
would
like
to
get
this
stuff.
That
is
going
to
be
persistent
story
in
scd
and
then
translated
in
some
other
resources.
A
Well,
thanks
daddy
this.
This
was
very,
very
helpful
to
understand
internals
in
the
while
you
were
speaking,
I
I
put
in
the
chat
some
links
to
the
kubernetes
operator
pattern,
kubernetes
components
because
you
mentioned
at
etcd.
You
mentioned
the
controller,
so
I
think
it's
very
good
to
understand
how
they
work,
but
thanks
for
this
explanation,
because
this,
I
think,
is
the
introduction
to
everything
no
and
dario
before
you
go
in
in
depth.
I
want
to
do
unchanged
here.
A
So,
if
you
see
since
we're
talking
about
operator,
let
me
put
this
new
background
here.
Okay,
so
now
I'm
ready
to
talk
about
kubernetes
operators
and
yeah.
That
was
a
little
joke.
I
was
planning,
but
it's
cool,
because
also
we
will
share
the
link
to
download
this
ebook
for
free
about
kubernetes
operators.
But
today,
here
we're
here,
daddy
for
live
demos
live
show.
So
the
first
thing
I
don't
know
andre.
If
you
have
a
question
for
this
introduction
about
the
internals
before.
A
If,
if
you
don't
have
a
question
about
those
internals,
I
think
we
can
go
to
the
first
step
dario.
So
we
understood
the
the
the
the
introduction
now
we
would
like
to
understand
why
operators
for
building
a
new
operator
and
and
how
to
do
it,
but
first
terror,
andrea.
Any
any
question
for
this
internals.
C
B
And
yes,
I
think
that
maybe
maybe
one
one
thing
that
could
be
added
to
that
is
that
you
have
the
freedom
to
decide
how
you
would
implement
it
by
by
coding
it,
and
you
have
choices
on
how
you
code
it.
D
Yeah
absolutely,
I
was
missing
also
another
example.
That
could
be
more
easy
to
understand
because
I
was
you
know
when
we
deal
with
kubernetes,
sometimes
I'm
feeling
the
toughness
the
fact
of
the
knowledge,
because
I
know
a
lot
of
stuff.
I
know
a
lot
of
internals,
so
maybe
it's
better
to
try
to
explain
also
controllers
with
a
simpler
example.
So
we
have
a
pot.
Okay,
that's
great!
A
pod
is
made
of
several
containers.
D
We
got
c
groups
and
spaces
volume
mounts
and
so
on
and
so
forth,
but
parts
they
got
also
some
ip
addresses.
Okay,
let's
keep
it
for
single
ip.
No,
so
let's
avoid
dual
suck
okay.
How
can
we
get
the
traffic
to
that
port?
It
means
that
we
have
an
endpoint
resource,
so
it
means
that
we
got
a
controller
and
that's
the
endpoint
slice
or
the
endpoint
controller
that
is
watching
for
parts
getting
their
eyepiece
and
then
finally
updating
to
the
point
resource.
So
we
can
get
traffic
from
other
services
to
the
pods.
D
A
Yeah
thanks
and
I
would
like
to
also
remember
remember
the
people
in
the
chat
and
that
see
more
people
are
coming.
If
you
have
any
question
to
that,
please
send
in
to
the
chat.
So
we
will
we.
We
have
the
chance
to
reply
your
question
this
hour,
but
I
know
that
you
that
there
will
be
more
and
more
question
while
you
kind
of
hands
on
so
when
you
are
ready.
Let
me
know-
and
I
can
we
can
start
in
in
the
in
the
deep
dive.
D
A
Please
please,
and
do
you
want
with
your,
do
you
want
to
share
anything
or
or
or
not?
Do
you
any
any.
D
Well,
well,
we
can
start
with
the
code
because
you
know
I
really
love
the
code.
So
it's
pretty
that's
simple.
A
Okay,
another
one,
only
one
thing:
dario:
can
you
please
increase
the
font,
absolutely.
D
D
So
writing
an
operator
is
really
simple,
because
what
you
have
to
do
is
to
pick
a
human
form,
put
it
in
front
of
the
terminal
and
say
operate
the
cluster,
no
joke
support.
So
we
are
lucky
enough
because
we
got
a
lot
of
stuff
out
there.
My
first
experience
writing
operator
was
using
the
sample
controller.
Although
you're
saying
dario,
you
just
told
us
that
controllers
are
not
operators
well
you're
right,
but
it's
the
starting
point
and
a
lot
of
tools
are
out
there.
We
got
cube
builder,
we
got
operator
sdk.
We
got
also
cap.
D
If
I
remember
correctly
the
name,
so
you
can
write
whatever
you
want
in
whatever
language
you
will
like
and
honestly
during
these
years
I
felt
very
good
with
operator
sdk
for
several
reasons.
I
had
also
experience
with
keybuilder,
but
I
guess
that
operator
sdk
is
good
enough,
because
in
the
end
is
not
so
much
opinionated
I
mean
the
operator
is
not
just
code.
Well,
it's
code,
but
it's
more
a
pattern
behind
that.
I
still
remember
that
chorus
were
the
inventors
of
the
operator
pattern
and
what
is
an
operator
pattern?
D
So
essentially
you
got
a
request.
Reconcile
request
and
you're
watching
the
current
state
and
moving
it
towards
the
desired
state.
So
it's
a
reconciliation
loop,
something
that
we
already
know
in
kubernetes,
because
it's
the
core
concept
behind
beretus.
There
is
a
drift
in
the
configuration.
I
apply
all
the
changes
to
reach
out
to
the
desired
state.
D
So
with
the
operator
pattern,
we
can
get
everything
that
we
want,
so
we
can
put
our
business
logic
and
it
means
that
we
can
do
in
several
ways.
We
can
write
our
code
and
honestly,
I
really
love
that
way,
because
I'm
a
former
software
engineer-
or
at
least
I'm
I'm
still
a
software
engineer,
because
it's
like
a
mark,
you
cannot
get
out
of
that,
but
you
can
also
break
the
cluster
using
hand
using
your
ansible.
D
It
really
depends
on
the
scope
of
your
operator,
so
operator.
Sdk
is
really
good
at
doing
this
stuff
because
it
says
you
can
use
hansible,
you
can
use
whatever
you
want,
so
you
can
write
your
code.
So
I'm
feeling
very
good
about
that.
So
how
to
write
that.
So,
obviously
we
need
our
binary.
It
can
be
downloaded
by.
C
Dario
one
one,
quick
question:
if
you,
because
at
the
end
of
the
day
operator,
is
just
young
files
and
container
in
the
cluster
just
simplified
and
you
can
create
operator
without
the
sdk,
how
much
the
sdk
sdk
helps
you
to
do
that.
If
you
compare
that
simple
operator,
sdk
takes
x
amount
of
time.
So
how
how
much
more
it
would
take
without
the
sdk.
D
A
lot
of
time,
honestly,
it's
a
question
more.
Regarding
software
development,
I
would
say,
because
it's
a
common
question
that
we
I
faced
several
times
across
my
career
when
I
was
working
in
our
companies
that
were
saying
so,
should
we
use
a
framework
or
should
we
build
our
framework
and
it's
a
matter
of
payoff.
You
know,
because
you
can
create
your
framework,
that's
good
enough,
but
there
is
a
downside,
and
the
downside
is
that
you
have
fully
ownership
of
that
project.
D
So
it
means
that
you
have
to
break
upgrade
it
the
doing
bug,
3-h,
doing
implementations
and
so
on
and
so
forth,
and
also
providing
documentation
and
ramp
up
for
new
developers,
because
it's
something
that
is
not
public,
or
at
least
it
couldn't
be
public.
D
Instead,
if
you
go
for
something
that
is
a
sort
of
standard
or
something
that
is
provided
by
the
community
like
operator,
sdk
is
much
easier
because
there
are
plenty
of
examples.
There
is
a
community
it's
much
more
easier.
Also.
Regarding
the
debugging
across
my
career,
I
had
also
the
pain
to
debug
others,
the
others
operators
and
the
best
way
to
do
that
is
to
looking
at
the
code.
Okay,
because
code
doesn't
lie
so
when.
D
D
Because
when
I
have
to
try
to
understand
what's
going
on,
if
I
open
a
project
that
has
been
scaffolded
using
operator
sdk,
I
can
easily
jump
out
to
the
section
where
I
think
the
bug
is
or
if
I
have
to
check
out
the
api
types
or
I
have
to
check
out.
Also,
I
don't
know
the
example,
the
examples
of
the
custom
resource
definition,
it's
that
simple,
otherwise,
will
be
a
pain
because
you
know
it's
like
creating
a
a
new
protocol.
There
are
plenty
of
protocols
all
day,
all
of
them
sucks
all
of
them
suck.
D
So,
let's
create
a
new
protocol.
Well,
it's
not
the
kind
of
way
of
working.
So
I
hope
I
replicate
your
question.
C
D
A
A
D
Well,
actually,
with
operator
sdk,
you
have
to
write
everything
in
go
and
I
would
say
that
I
had
several
questions
regarding,
should
we
use
go
or
python
or
java
and
so
on
and
so
forth?
And
honestly
it
really
depends.
But
I
understand
that
saying
it
really
depends.
Doesn't
answer
any
questions,
so
I
will
try
to
elaborate
a
bit
more.
So
if
your
team
is
mostly
focused
on
java
or
python
or
whatever
language
you
prefer,
I
don't
think
that
the
payoff
is
positive.
Switching
over
go
okay,
because
that
will
require
a
huge
mind.
D
New
mindset
of
developing,
I
really
hate
when
I
see
python
code
that
has
been
wrote
in
a
different
way
in
not
not
in
the
pythonic
way.
You
know,
and
the
same
also
applies
for
goal
when
I
see
go
that
has
been
written
by
people
that
works
mostly
in
java.
D
I
will
I
don't
know,
I
don't
know
if
I
can
say
bad
words,
but
that
would
be
really
bad
bad
bad.
So,
let's
try
always
to
focus
on
your
knowledge.
So
if
you
would
like
to
extend
kubernetes-
and
you
know,
go
you
can
use
operator
sdk,
otherwise
you
can
use
whatever
you
want.
I
don't
think
that
the
runtime
here
is
is
the
silver
ballot.
Okay,
the
real
silver
palette
is
translating
all
your
business
logic
inside
the
operator,
because
the
operator
is
just
a
tool.
D
D
Gotcha
yeah
great
great
anyway,
keep
in
mind
that
operator
sdk
is
scaffolding.
Project
single!
I
really
love
go
honestly.
I
really
love
some
stuff
go.
Sometimes
I
miss
some
features
but
keep
in
mind
that
that's
really
cool
and
since
you
were
talking
also
regarding
quarkus,
I
just
wanted
to
point
out
this
because
keep
in
mind
that
operator
sdk
allows.
C
A
Can
pick
your
kind
of
programming,
language
or
tools
like
I
see,
ansible,
helm,
customize
and
and
quarkus,
so
you
can
scaffold
a
new
project
using
one
of
this
programming,
language
or
framework.
D
Well,
keep
in
mind
that
these
plugins
is
something
that
has
been
inherited
by
cube
builder,
because
there
is
a
long
story
behind
the
cooperation
between
operator,
sdk
and
cube
builder
keybuilder,
if
I
recall
correctly,
was
one
of
the
first
project
that
was
working
on
developing
operators.
D
D
And
finally,
I
went
for
operator
sdk
for
several
reasons,
but
we
are
in
a
good
spot
right
now,
because
after
some
efforts,
they
started
in
2019.
If
I
recall
correctly,
a
sort
of
fusion,
a
sort
of
cooperation
between
cube
builder
and
operator,
sdk
started
with
a
deep
integration,
so
just
to
say
that
these
are
cube.
Builders
plugins
and
these
plugins
are
really
useful.
D
If
you
would
like
to
scaffold
the
code
according
to
your
needs,
so
in
the
end
with
operator,
sdk
you're
ending
with
creating
go
codes,
but
with
the
plugins
you
have
the
chance
to
scaffold
the
code
according
to
best
practices
for
your
strategy.
B
D
If
you,
I
never
use
quarkus
honestly,
because
you
know
I
don't
like
java,
but
it's
just
a
matter
of
taste,
but
if
you
would
like
to
implement
the
your
operator
with
more
opinions
away
for
quarkus,
you
just
need
to
use
the
plugin,
so
the
generated
code
is
going
to
be
scaffolded
according
to
your
scaffolding
strategy
and,
what's
really
cool,
is
that
you
can
also
use
create
your
own
plugins,
because
what
I
really
love
regarding
kubernetes
and
besides
also
operator,
is
that
if
you
would
like
to
extend
the
capabilities
of
kubernetes
like
custom
resources
or
extended
api
servers,
it's
that
simple.
A
That's
amazing
what
you
say
so
basically
this
is
a
plugable
interface.
If
I
want
to
write
my
let's
say
rust
operator,
sdk
plugin,
I
can
just
create
this
plugin
and
insert
in
this
architecture.
A
D
D
Yeah,
just
joking,
but
yeah
you
can
convert
that
there
were.
There
was
also
a
guide
regarding
how
to
translate
from
v2
to
b3,
because
I
still
remember
that
in
v2
there
were
many
int
functions
in
go
so
keep
in
mind
that
go
provides
several
ways
to
group
your
code.
You
got
the
modules
or,
I
would
say
the
packages
and
each
package
provides
a
way
to
initialize
it.
D
Okay
and
this
init
function
is
going
to
be
executed
when
you
are
importing
your
package
and
there
are
some
linters
or
some
metal
interstate
discard
the
use
of
init
functions.
So
it's
really
cool
that
starting
from
v3.
We
don't
have
any
more
in
it.
I
would
say
that
it's
just
a
matter
of
styling
stuff.
There
are
no
huge
side
effects.
Besides
the
fact
that
init
functions
are
just
function,
you
don't
have
error
handling,
so
it's
really
tough
to
manage
the
error
handling.
But
you
know
it's
just
a
matter
of
style.
D
That,
if
you
will,
if
you
will
start
writing
your
operator
going
for
the
latest
version,
is
safe
and.
B
A
D
A
A
newbie
I
want
to
start
creating
my
operator.
I
I
is
that
the
default
option
yeah.
D
Okay:
okay,
it's
the
default!
One!
Don't
worry,
don't
worry,
as
I
show
you
early
so
when
we
run
operator
sdk,
we
got
all
this
stuff
saying
we
can
do
a
lot
of
stuff.
We
got
the
bundle
clean
up
completion
create.
So
what
we
are
going
to
do
right
now
is
to
focus
on
the
init,
so
we
have
to
initialize
a
new
project.
Otherwise
we
cannot
do
anything
else,
okay.
So
what
I
do
every
time
that
I
issue
a
comment.
I
read
the
redmi
or
the
hub,
so
how
can
I
do
that?
D
I
have
to
issue
operator
sdk.
If
I
would
like
to,
I
can
also
set
the
plugins
and
then
we
got
the
domain
and
the
owner
so
keep
in
mind
that
right
now,
with
these
statements,
we
are
creating
go
code,
but
we
are
scaffolding,
just
the
operators.
So
to
do
that,
I'm
going
to
issue
operator,
sdk
init
and
then
let's
go
for
reflex.
D
I
would
like
to
put
the
domain
so
the
domain
for
groups
so
domain.
I
would
say
that
we
could
use
the
default
one
my
domain
and
then
we
have
to
set
also
the
license.
Let's,
for
let's
go
for
the
apache
2,
the
owner,
the
owner,
I'm
going
to
say
my
github
account
from
ethereum
and
the
product
name
project
name,
I
will
say
my
operator
and
then
we
have
to
set
also
the
project
version.
D
Let's
go
for
github.com
from
tyrion,
my
operator.
Okay,
with
this,
what
we
are
going
to
do
is
to
get
a
scaffolding
of
all
the
resources
that
have
been
created.
So,
as
you
can
see,
we
got
the
docker
file,
the
gomod
hack
main
make
file
and
project.
So
this
is
our
starting
point
at
this
point.
What
I
would
suggest
is
to
perform
it
in
it.
It
commit
everything.
First
comment:
okay
or
initial,
commit
what.
D
I
don't
know
the
name,
but
I
really
love
also
why
I'm
coding
to
see
the
div,
the
git
div,
to
understand.
What's
going
on,
because
since
we
are
talking
about
scaffolding,
sometimes
you
are
missing
the
focus
on
what
operator
sdk
is
going
to
do
so
just
to
show
with
all
the
people
I'm
going
to
do
to
do
that,
so
it
was
within
it
yeah.
So
it
come.
Oh,
let
me
check
yeah.
We
have
to
add
everything,
get
comment
and,
let's
say.
D
A
D
Well,
these
are
the
default
one
offered
by
zsh,
but
I
got
another
one
that
I
really
love,
that
is
kill
p
and
hill
p
is
to
kill
a
pod
with
grace
period
equals
to
zero
and
force,
because
sometimes
you
are
ending
up
with
pods
that
are
out
there
in
waiting
state
terminating
saying
and
oh
my
gosh.
I
have
to
wait.
No,
no,
no!
No!
I'm
in
production!
I
have
to
kill
everything
so
yeah.
A
C
B
D
A
Anyway,
before
luca
in
the
chat
were
saying,
the
way
the
operator
looks
like
inside
kubernetes
might
be
a
technical
details,
but
it's
very
important
to
understand
the
concept
of
reconciliation,
loop
and
decided
state
versus
actual
state.
So
this
is
what
what
daddy
was
saying
mentioning.
I
think
that
we
will
go
into
again
into
reconciliation
loop,
but
yeah,
but
that
is
the
main
topic.
So
thanks
luca
for
your
note
in
the
chat.
D
Yeah
yeah,
thank
you
so
much
so,
let's
commit
so
git
commit,
I
will
say,
git
commit
and
let's
go
for
initial
commit
yeah.
We
got
our
operator.
Everything
has
been
committed,
so
we
are
on
master.
So
let's
take
a
look
also
to
what
we
have
right
now.
So
I
hope
that
you
are
familiar
with
go
in
case.
You
are
not
that's,
not
a
big
problem,
so
we
got
a
godmode
file,
so
go
mod
file,
and
here
it
is
so
essentially
we
got
our
module.
D
That
is
github.com
from
affiliate
on
my
operator
and
if
you
recall
correctly,
it's
the
one
that
I
couldn't
where.
Where
are
you
here?
It
is
so
essentially
this
repo
is
going
to
be
used
here.
We
are
using
a
go
version.
1.16
doesn't
matter
because
this
has
been
scaffolding.
This
way
you
can
use,
go
1.17.
D
In
fact,
I'm
using
that
and
we
got
some
dependencies.
So
we
got
api
machinery,
we
got
the
client
go
and
the
controller
runtime
keep
in
mind
that
operator
sdk.
D
I
I
don't
want
to
say
bad
words
regarding
operator
sdk,
but
operator.
Sdk
is
just
a
scaffolding
tool.
Okay,
because
we
have
to
pay
kudos,
we
have
to
say
thank
you
a
lot
of
thanks
honestly
to
the
controller
and
time
special
interest
group,
because
essentially
the
operator
components
are
managed
by
this
special
interest
group,
or
rather,
I
will
say
by
this
library,
by
this
module
or
whatever
you
would
like
to
call
them.
Since
we
are
in
the
go
context,
I
would
say
in
this
module,
so
we
are
using
the
0.10.
A
X,
do
you
recall
your
dependency
version
in
your
in
your
head
blackout?
So
I
don't
think
that.
B
D
I
got
a
dependency
on
kubernetes,
but
yeah.
I
never
told
them
to
my
wife,
but
I
guess
she
is
suspecting
something
anyway
yeah.
I
remember
my
dependencies
because
I
had
so
many
issues
while
I
was
trying
to
upgrade
from
back
and
forth
from
a
version.
So
that's
the
reason
why
I'm
remembering
that,
anyway,
with
the
go
modules,
it's
a
sort
of
package.log
in
node.js,
or
rather
composer.json
in
php
or
whatever
you
would
like
to
use
to
lock
your
dependencies.
This
is
not
the
log
file.
D
Obviously,
the
log
file
is
stored
in
go.some,
where
we
got
everything
yeah
pretty
nice
ashes,
arches
cool
actually
everywhere.
But
what
I
would
like
to
get
more
focus
is
the
project
file.
Okay,
because
with
project
file,
what
I
really
love
is
the
fact
that
we
are
storing
in
a
declarative
way
how
we
are
structuring
our
operator.
So
essentially,
we
are
storing
the
version,
and
this
is
really
cool
to
understand.
Also
for
newcomers
that
are
we
using
version,
2
version
3,
which
plugins
are
we
using
or
not?
D
What's
the
project
name,
the
repository
the
layout
and
the
domain,
since
these
are
essential,
also
when
we
are
generating
types
and
apis?
Why
api
and
types,
because
the
main
difference
between
a
controller
and
an
operator
is
that
the
controller
is
managing
the
kubernetes
resources,
so
deployment
services,
endpoints
config
maps
secrets
whatever
you
want.
Sometimes
I
call
them
the
default
resources.
I
know
that
maybe
the
name
is
not
the
right
one,
but
I'm
referring
to
the
apis
offered
by
default
by
the
api
server.
The
operator
instead
is
managing
custom
resource
definitions
crds.
D
So
essentially
we
are
translating
a
crd,
something
that
is
not
standard
in
kubernetes
to
create
something
not
directly,
but
sometimes
we
create
something
inside
of
the
kubernetes
cluster.
So
we
are
translating
this
crd,
this
custom
resource
definition
instance
in
something
that
is
going
to
be
deployed
inside
the
cluster.
So
since
I
recall
there
was
a
question
regarding
luca
about
the
operator
patterns
on
and
so
forth,
yeah.
It's
also
regarding
the
pattern
behind
that,
but
also
keep
in
mind
that
the
operator
to
be
classified
like
an
operator
must
manage
also
custom
resource
definitions.
D
D
Let's
go
for
vi,
so
there
is
a
plenty
of
stuff
here,
honestly,
a
lot
a
lot
of
targets,
but
this
is
really
cool
because
I
hope
you
all
love
makes
file
honestly.
I
love
them
because
it's
old
school
automation-
and
I
really
love
that,
although
I
I'm
pretty
young-
I
guess
so,
but
with
the
make
file,
we
got
a
lot
of
stuff
because
essentially
we
have
all
the
management
of
our
operators
so
how
to
deploy
an
operator.
D
We
have
to
build
the
binary.
We
have
to
build
the
docker
image.
We
have
to
build
the
manifest
we
have
to
install
the
manifest.
We
have
also
to
manage
the
full
life
cycle
of
the
operator,
so
installing
and
uninstalling-
and
everything
is
here
in
this-
make
file.
Obviously
it's
just
a
scaffolded
one
for
capsule,
for
example,
we
extended
it
a
little
bit,
but
it's
really
cool,
because
you
don't
have
to
write
on
your
own.
It's
only
automated
it's
all
generated.
D
You
don't
have
to
do
anything
so
if
I
would
like
to
test,
I
just
need
to
issue
make
test
end
of
the
story,
and
obviously
we
got
some
prerequisites
like
creating
manifest
generating
the
code
generation
part
performing
the
fmt
vt.
These
are
sort
of
linters
and
scaffolding
also
the
m
test.
D
C
D
Yeah,
keep
in
mind
that
actually
we
are
using
on
capsule
the
make
file
also
to
scaffold
the
end-to-end
test
suite,
because
since
it's
an
operator
to
manage
multi-tenancy,
we
would
like
to
test
with
real
kubernetes
also
because
we
have
to
ensure
a
compatibility
matrix.
So
we
have
to
test
on
kubernetes,
1.16,
17,
18,
19,
20
and
so
on
and
so
forth,
and
using
the
make
file
is
really
cool
because
you
have
to
write
your
github
action
say,
make
end
to
end
slash
the
version
end
of
the
story
and
also
from
the
developer
experience.
D
If
a
new
developer
is
developing
something
for
capsule.
What
he
has
to
do
is
just
to
issue
that
make
target
end
of
the
story,
otherwise
will
be
a
pain,
so
the
ci
stuff.
D
Yeah
yeah,
that's
true,
in
fact.
Maybe
I
I
used
the
right
words,
but
I
was
trying
to
say
that
the
operator
can
manage
or
not
kubernetes
resources,
because
there
is
something
really
cool
project
out
there
like
the
cloudflare
one,
although
I
never
use
that,
but
also
take
a
look
to.
I
don't
remember
the
name:
crossplane
playing
okay
with
first
plane,
you're
creating
customers.
Well,
you
have
plenty
of
custom
resources,
mostly
for
infrastructure
staff
that
are
generating
stuff
outside
of
your
kubernetes
cluster.
D
So
I
would
like
to
get
the
postgres
sql
database
match
on
azure
or
whatever
you
want.
You
just
need
to
create
the
instance
and
there
you
go
obviously
maybe
will
be
helpful.
Also
having
additional
resources,
like
I
don't
know
the
secrets
containing
the
connection
string
to
that
possible
sequel.
But
you
know,
I
hope
that
you
get
the
point
about
that,
but
yeah,
that's
really
cool.
A
Yeah,
that's
cool
and
also
that,
since
you
mentioned
we're
there,
there's
a
new
operator
we
are
building
here
in
redat
was
called.
Is
a
service
called
the
red
that
open
database
access
roda?
So
basically
it
connects
is
an
operator
that
connects
the
deployment,
your
deployment
to
a
database
as
a
service
on
some
third-party
sas.
So
the
database
is
elsewhere.
A
Your
your
pods
are
in
the
cluster,
but
they
are
connected
and
the
operators
make
sure
this
connection
is
exists
and
it
works
out
of
the
box.
So
yeah
thanks
luca
for
your
your
point.
D
A
D
Operator
and
I
would
say
just
for
a
reference
force
ferrari,
because
if
you're
following
ferrari
formula
one,
you
know
carlos
signs
always
said
smooth
operator
anyway.
Sorry,
sorry,
forza
ferrari,
anyway.
At
the
same
time,
let's
go
also
to
take
a
look
to
the
code,
because
this
is
really
cool.
Okay,
I'm
using
beam,
you
know,
but
I
got
also
goland.
So
maybe
it's
not!
No!
No,
let's
not
talk
about
other
tools.
So
let's
use
vi
okay.
D
So
this
is
our
main
goal
and,
as
you
can
see
here,
we
got
several
stuff
like
this.
Keep
builder
scaffolding,
ports,
and
this
is
the
proof
that
there
is
a
huge
connection
between
operator,
sdk
and
cube
builder.
So
you
can
take
a
look
to
the
documentation
of
q
builder
and
you
will
see
that
will
be
appliable
also
for
operator
sdk.
So
what
is
going
to
do
could
be
the
scaffolding
ports,
since
the
operator
needs
to
manage
custom
resource
definitions.
D
We
have
to
import
that
in
our
code
base-
and
this
is
just
a
marker-
because
when
we
are
creating
a
new
api
type-
and
we
will
see
that
this
is
going
to
be
imported
here
in
a
automated
way
and
the
same
applies
also
here.
Unfortunately,
we
still
have
some
heat
functions.
D
That's
not
a
big
problem
honestly,
but
just
to
show
that
you
know,
let's
be
pragmatic,
so
we
got
a
plenty
of
stuff
and
what
I
really
love
also
regarding
controller
manager-
and
I
guess
that
was
the
question
by
taro-
should
we
write
our
operators
on
our
own
or
using
sdks
or
libraries
and
so
on
and
so
forth.
D
I
will
say
that,
thanks
to
the
controller
manager
and
the
controller
and
time
special
interest
group,
we
could
get
a
manager
of
our
custom
controller
that
is
managing
a
custom
resource
definition,
and
so
it's
going
to
be
the
final
operator
that
got
everything
bundled
it.
So
it
means
that
I
got
metrics.
D
I
got
the
web
book
servers.
I
got
the
indexers.
I
got
everything
that
is
really
good
to
write
operators.
Okay,
we
will
have
also
the
opportunity
to
see
everything
anyway,
just
to
show
you
our
operator
is
going
to
be
managed
by
a
manager.
So
essentially
we
are
listening
on
a
specific
port,
and
this
is
a
port.
You
will
ask
me:
why
do
we
have
a
port
here?
Well
with
web
books?
We
need
web
books
and
then
we
got
several
options,
but
it's
pretty
straightforward.
D
I
mean,
if
you
try
to
take
a
look
to
this
code.
You
see
that
we
got
several
slack,
so
we
are
accepting
some
flags
to
this
binary.
We
are
setting
the
logger,
we
are
initializing
our
manager
and
then
we
are
adding
some
health
probes
and
then
finally,
we
are
starting
the
manager
end
of
the
story.
It's
pretty
that
simple,
and
with
that
said,
I
would
like
just
to
add
also
a
note
regarding
the
web.
D
Why
we
need
web
book
because
keep
in
mind
that
the
customer
resource
definitions
are
going
to
be
installed
using
a
resource,
and
this
resource
is
a
sort
of
open
api
specification,
be
free.
Okay,
and
with
that
said,
we
don't
have
so
much
control
on
the
validation
of
data
okay,
and
it
means
that
if
we
would
like
to
put
in
place
some
specific
validations
like
you
can
use,
I
don't
know
even
or
odd
numbers
or
just
the
fibonacci
scheme.
You
have
to
implement
your
own
validation
and
this
validation
is.
D
D
I
have
to
apply
maybe
anyway
just
trying
to
say
that
if
you
would
like
to
put
something
a
validation,
a
custom
validation,
you
need
web
book
and
web
book
are
really
important,
also
for
the
kubernetes
ecosystem.
We
all
know,
I
guess
open
policy
agent.
We
know
kiverno.
There
are
plenty
of
resources
out
there
that
are
using
the
dynamic
admission
control
and
so
validating
the
books,
or
also
imitating
the
books
to
perform
assault,
a
sort
of
policy
enforcement
on
your
cluster.
D
This
policy
enforcement
could
be
also
applied
to
your
customer
resource
for
the
validation
or
whatever
you
would
like
to
achieve,
but
since
time
is
running
out
like
the
new
song,
I
don't
know
if
you
remember
that,
but
I
was
playing
a
lot
of
muse
music.
Let's
take
a
look
also
to
how
to
create
my
custom
resource
definition.
So
we
got
a
comment
and
the
command
is
create
and
we
got
the
create
api.
D
We
got
also
the
webhook
so
a
web
book
for
an
api
resource.
What
I'm
going
to
say
is:
okay,
let's
create
the
api
and
it
says
create
results,
but
I
don't
like
this
stuff:
let's
go
for
h.
So,
where
is
the
hub?
So
we
got
operator
sdk
create
api,
okay
and
we
can
specify
the
group
and
the
version
and
the
kind
okay.
Let's
go
for
the
example
the.
So
we
are
sticking
to
that.
D
D
And
kind
okay
and
the
api
version
is
always
made
of
three
parts.
So
we
got
the
group,
the
group
and
the
version
and
the
kind
this
is
from
the
code
perspective,
but
in
the
yaml
definition
we
got
these
two
fields,
so
the
group
could
be
my
group,
slash
v1
and
the
kind
could
be
my
kind
or
kind.
My
kind
would
be
better.
D
D
Obviously
yes,
and
here
we
are
so
what
I'm
referring
regarding
the
controller,
keep
in
mind
that
this
could
be
a
bit
disturbing,
because
we
are
trying
to
implement
an
operator
and
we
are
talking
about
controller,
but
the
controller
in
this
case
is
referring
to
the
manager
controller,
the
one
that
we
saw.
It
was
red
at
ma.
Oh
my
gosh,
it
was
documents
read
out
my
operator
vi,
main.
D
Mgr
yeah
I'm
referring
to
this
one,
so
we
got
a
manager
that
is
managing
several
controllers
and
each
controller
is
controlling
a
custom
resource
definition
and
with
that
said,
let's
take
a
look
and
yeah.
We
got
everything.
So,
as
you
can
see
here,
we
got
a
lot
of
stuff.
We
got
some
make
targets
that
are
creating.
We
got
new
files
and
in
fact,
if
we
try
to
issue
git
status
gst,
we
got
some
changes
and
some
untracked
files.
So
let's
go
for
the
git
beef
yeah
gd
is
good.
D
Yeah
yeah,
I
know
that
I
know
that
anyway,
as
you
can
see
here
when
we
create
a
new
project,
a
new
api.
D
These
apis
are
going
to
be
injected
inside
the
project
and
it's
really
cool,
because
taking
a
look
at
taking
a
look
to
the
project,
I
can
understand
which
custom
resource
are
going
to
be
managed
by
this
operator
and
obviously
we
got
also
a
lot
of
stuff
regarding
the
go
mode,
and
this
is
more
interesting
because
if
we
take
a
look
to
the
main,
take
a
look
here,
so
we
got
the
cube
builder
scaffolding,
ports.
So
we
got
our
pointer,
our
keybuild
pointer.
D
It
is
saying
we
have
to
add
something
new,
so
we
are
adding
ship
better
one
and
we
got
also
the
controllers.
So,
instead
of
doing
this
manually,
that
could
be
error
prone.
I
just
need
to
issue
my
command
using
operator
sdk,
and
the
same
also
applies
for
the
util
time
registering.
This
is
required
by
because
we
are
not
using
the
it's
also
a
long
discussion
regarding
the
client
to
interact
with
the
api
server.
So
we
have
to
register
the
scheme.
D
Otherwise,
we
cannot
interact
with
the
api
and
finally,
since
we
got
our
manager,
we
got
our
controller
where
we
are
injecting
our
client
from
the
manager
we
scheme
from
the
manager,
and
we
are
setting
up
that,
keep
in
mind
that
this
is
weird
because,
as
you
can
see,
we
are
generating
the
controller
then
setting
up
with
the
manager
but
injecting
the
manager.
Inside
of
that.
So
it's
a
bit
tricky,
but
it's
working.
It's
something
that
honestly,
I
don't
like
so
much.
D
Recording
the
scaffolding
by
operation
sdk,
but
you
know
it's
working,
it's
good
enough,
so
I'm
not
complaining
about
that,
and
mostly
what's
really
cool
is
that
we
got
also
new
files
like
this
one.
We
got
api
v1
beta1
and
we
got
our
create
types.
So
with
that
said,
it's
not
a
very
sdk,
but
it's
keybuilder
that
is
managed
by
operator
sdk.
This
is
doing
all
the
magic.
So
essentially
we
got
our
package,
our
versioning.
We
got
our
spec
our
status
and
also
the
list
struct.
D
D
Okay,
since
we
don't
have
generic
single,
we
are
coping
with
code
generation,
so
this
is
mandatory
in
order
to
interact
also
with
some
utilities
offered
by
the
kubernetes
got
the
code
base.
So
the
deep
cutting
deep
copy
method
must
be
implemented,
otherwise
would
be
a
pain,
and
with
that
said,
we
are
ready,
because
in
the
end
we
scaffolded
an
operator
just
the
code
base.
We
scaffolded
an
api
in
less
than,
I
would
say,
30
minutes
and
honestly,
it's
absolutely
mesmerizing.
D
I
would
say
that
tests
are
absolutely
important
when
you're
developing
software,
but
especially
with
operators
test.
D
Oh,
no,
I'm
not
I'm
not
particular,
no,
I'm
not
a
big
fan
of
that
honestly.
Don't
know,
I
guess,
because
I'm
not
so
good
at
developing,
so
I'm
I'm
not
trying
to.
I
don't
like
the
tdd
honestly,
but
I
prefer
the
end
to
end
honestly
just
a
matter
of
taste
by
the
way.
A
Yeah,
that's
that's
how
I
think
a
philosophy
I
don't
know
terror
or
andrea,
which
philosophy
you
follow.
Tdd,
not
dddd,
just
test
not.
C
B
Well,
I
agree
with
the
ted
approach
when
it's
possible.
A
B
Or
maybe
that
could
be
the
topic
for
another
for
another
session
operators?
How
do
you
actually
implement
the
control?
B
A
D
D
It's
writing
the
right
specification
and
writing.
The
right
specification
is
like
writing
apis
because
keep
in
mind
that
custom
resource
definitions
are
going
to
be
used
like
apis.
Whenever
we
interact
with
the
api
server,
essentially,
we
are
doing
both
put
post
patch
get
resources
so
starting
from
the
beginning,
with
the
right
approach
with
the
right
struct
and
everything
else
is
absolutely
mandatory,
and
what
I
really
love
from
kubernetes
itself
is
that
when
you
make
mistakes
like
oh
my
gosh,
I
totally
forgot
this.
D
I
don't
know
this
field
or
this
feature
you
can
cope
with
annotations.
I
know
that
a
lot
of
people
ate
annotations
but
at
the
same
time
also
using
operators.
Since
you
are
the
owner
of
your
custom
resource,
you
can
use
versioning
and
that's
really
really
cool,
because
with
versioning
you
can
create
new
features
without
any
breaking
change.
A
Definitely
definitely
dario.
So
thanks
for
this
thanks
for
this
session.
Well,
we
basically
scaffolded
the
new
operator
in
20
minutes
or
15
minutes
talking
about
also
your
git
alice's.
I
think
it
was
really
15
minutes.
It
was
great,
so
this
was
an
example
on
how
to
scaffold
the
new
operator
and
and
it's
part
of
our
new
series
about
how
to
write
an
operators
or
just
writing
operators
on
kubernetes.
A
A
We
will
have
a
second
episode
again
with
dario,
because
we
like
how
he
explained
the
things
it's
really
good
and
how
what
we
should
take,
what
we
should
put
in
in
the
controller
in
this
controller
and
right
now
we're
we're
we
are
going
out
of
time.
So
I
would
like
to
close
up
everything
with
what
we
we've
seen.
So
we
we,
we
have
the
this
overview
on
operator.
A
Sdk
dario
is
the
outer
on
a
operator
which
is
the
capsule
operator,
so
you
can
see
what
it
made
live
with
operator
sdk.
It
created
the
capsule
operator,
which
is
a
an
operator
for
bringing
multi-tenancy
in
kubernetes.
He
also
presented
it
on
kubecon
last
time.
So
please
check
out
the
repo
I
put
in
the
chat
and
let
me
also
leave
some
other
appointments
today.
Openshift
tv
is
live.
You
can
check
the
the
live
streaming
today.
What
we
have
in
the
shadow
we
will
come
back
andrea.
A
We
will
come
back
again
next
wednesday,
wednesday.
The
ninth,
together
with
the
winners
of
the
red
that
act
fest
we
we're
gonna,
celebrate
them
for
the
operator
series.
We
come
back
on
march,
the
second
with
sebby
and
another
people
person
from
our
engineering
talking
about
the
outright
operator,
also
in
java
with
the
quercus
plugin,
and
then
we
come
back
with
dario
again
where
we
will
sync
on
on
the
next
appointment
where
we
want
to
implement
the
second
part
of
this
operator.
A
I
think
I
I've
shared
everything.
Do
you
have
any
final
thought
things
to
say:
andrea
dario,.
A
A
C
A
That
was
the
reason
of
this
episode,
I'm
glad
we
we
reached
this
goal
and
happy
the
audience
also
enjoyed
this
episode.
The
episode
is
gonna
be
recorded
at
the
same
link.
You
have
either
in
youtube,
and
it's
going
to
be
available
also
on
twitch,
if
you
are
following
from
twitch
so
folks,
thank
you
for
joining
us
today
was
really
a
pleasure
to
have
you.
Our
next
appointment
is
always
an
openshift
to
be
on
the
schedule
you
have
in
the
chat
or
with
the
openshift
coffee
break.