►
Description
#Knative #OpenSource
WordPress on Knative by Evan Anderson, Software Engineer at VMware
One of the ways to learn about systems is by pushing their boundaries. The typical WordPress-on-Kubernetes demo uses a stateful WordPress server talking to a stateful database. WordPress seems like a great candidate to run as a stateless, scaleable service. What happens when we try to run a stateful WordPress on Knative? We learn a lot about WordPress and Knative!
A
Okay,
is
that
pretty
visible
for
everyone?
Yes,
yes
great,
so
why
am
I
here
and
why
am
I
talking
about
wordpress,
so
I've
been
working
on
canada
for
a
while
and
one
of
the
fun
things
about
k-native?
Is
that
it
and
kubernetes
both
are
designed
to
run
lots
of
different
software,
and
that
includes
running
software
that
maybe
wasn't
designed
with
kubernetes
in
mind
and
wordpress
is
a
great
example
of
that.
A
You
know,
there's
lots
of
places
you
can
go
and
you
can
pay
like
five
bucks
a
month
or
something
like
that
to
get
your
wordpress
site
hosted.
So
this
is
clearly
more
about
learning
than
it
is
about
being
the
strictly
most
cost-effective
option,
but
I
wanted
to
be
able
to
get
some
experience.
Actually
you
know
using
k-native.
A
Maybe
it
wasn't
exactly
the
way
it
was
intended,
but
with
some
real
software
that
was
big
enough,
that
I
couldn't
just
like
change
the
shape
of
it
and
make
it
you
know,
do
the
things
I
wanted
and
you
know
I
wanted
a
place
to
have
a
blog,
and
so
I
figured
that's
kind
of
an
excuse.
A
So
learning
by
doing
I
feel
like
is
really
important,
because
it's
really
easy
to
convince
yourself
that
you
know
what's
going
on
and
then
later
on.
It
turns
out
that
that's
not
really
true,
so.
A
I
wanted
to
be
able
to
run
real
software,
so
that
includes
stuff.
Like
upgrades-
and
I
learned
a
lot
of
stuff
about
kubernetes
upgrades,
including
scary,
etsy
d
surgery,
when
you
screw
up
your
quorum
and
you
have
two
nodes
down
that
you
re
reinstalled
and
you're,
trying
to
figure
out
how
do
I
get
quorum
for
x
for
etcd
when
it
expects
three
nodes?
And
I
have
only
one-
k-native-
has
not
been
the
painful
part
here,
which
is
great.
A
But
it's
given
me
more
empathy
for
people
running
kubernetes
on
their
own
and
I
wanted
it
to
not
be
too
expensive.
So
you'll
actually
see
the
hardware
set
up
at
the
end.
A
I
did
a
blog
about
it
because
I
had
a
blog
and
I
needed
some
content,
so
kubernetes
documentation
actually
has
you
know
how
to
run
wordpress
in
my
sequel
and
you
can
see
it's
under
stateful
applications
and
they
show
you
how
to
set
up
my
sequel
and
then
how
to
how
to
set
up
wordpress
and
you'll
notice
again
they're
using
a
persistent
volume
claim
they
are
using
a
deployment,
but
I
think
they
are
mounting
it
in
a
read,
write
once
mode,
so
their
deployment
can
only
scale
to
one.
A
So
that's
a
thing
you
could
do,
but
I
feel
like
we
should
be
able
to
do
better.
This
is
a
web
app.
A
A
So
if
we
actually
go
in
and
look
at
this
docker
image,
the
nice
thing
is
there
is
this
docker
file
template
that
does
some
stuff,
but
at
the
end,
basically
it
says
your
entry
point
is
docker
entry
point
and
then
they've
got
a
bunch
of
different
varieties
of
image,
but
here
is
where
they
all
do
their
setup,
and
so
you
can
kind
of
get
in
here
and
see
what
it
does
and
basically
they're
packaging,
some
stuff
and
they're
copying
it
into
the
target
directory,
which
is
pwd.
A
A
So
whoa
that's
a
pretty
simple
docker
file
and
I
just
downloaded
and
unzipped
the
nanospace
theme,
which
is
the
one
I'm
using
and
downloaded
installed
it
and
here's
where
we'll
show
the
final
product,
and
so
this
is
actually
cold
starting
over
there.
It's
actually
in
my
basement
running
off
my
dsl
line,
and
here
we
go
it's
up
and
running
and
if
you
wanted
to
see
the
cable
management
is
a
little
neater
now,
but
it's
basically
three
of
these
dell
thin
clients
with
about
eight
gigs
of
memory
on
each
one.
A
And
yeah-
and
so
this
was
my
first
attempt-
you
know
build
that
docker
file.
Stick
it
in
the
k
native
service,
put
in
a
couple
secrets
and
point
it
to
my
sequel
from
an
operator
yeah,
it
is
aj
you,
I've,
actually
unplugged
one
of
these
and
everything
keeps
working.
So
that's
kind
of
cool.
A
So
my
first
attempt
it's
all
working,
that's
awesome
and
then
I
go
to
write
a
post
and
it
takes
me
like
five
minutes
it
scales
down
and
then
I'm
logged
out,
which
is
weird
because
when
I
come
back,
it's
asking
me
to
log
in
again.
A
So
digging
around
a
little
bit
each
run
generates
a
unique,
unique,
auth
key
and
some
other
variables
that
are
used
to
set
various
cookies,
and
so
I
create
a
secret
for
that
and
I
go
in
and
I
set
wordpress
secure,
auth
key
and
logged
in
key
and
nonce
key.
A
It's
pretty
boring
to
do
that,
but
copy
paste
and
you
know
you're
off
to
the
races.
This
is
actually
more
recent.
So
this
will.
This
is
hinting
a
little
bit
of
other
stuff.
I
needed
to
do
great
so
now
I'm
not
getting
logged
out
anymore
and
I
try
putting
together
that
first
post
and
I
upload
this
image
and
I
go
to
post
it
and
then
I
go
and
check
in
five
minutes
and
the
image
is
gone
which
doesn't
seem
right
so
yeah.
A
It
looks
like
wordpress
stores
images
on
local
disk
too,
and
since
we
want
to
be
able
to
scale
out
wordpress-
that's
probably
not
great
so
yeah.
What
can
we
do?
It
turns
out.
Other
people
have
had
this
problem.
They've
tried
to
run
wordpress
in
a
somewhat
more
automated
fashion
and
there's
a
couple
of
different
s3
plugins.
A
But
this
one
is,
it
says
it's
lightweight:
it
seemed
pretty
easy
to
install
and
didn't
have
any
licensing
requirements,
and
so
that
felt
like
what
I
was
looking
for
since
I
was
looking
for.
Do
this
on
a
budget
and
kind
of
hack
things
together.
A
So
that's
awesome
and
at
this
point
I
realized
that
downloading
this
and
unpacking
it
and
everything
else
is
probably
not
the
awesome
thing
I
wanted
to
do,
and
so
I
go
and
make
a
two-stage
docker
file,
and
you
can
see
that
I'm
downloading
these
with
curl
and
unzip,
and
so
I
need
an
image
with
curl
and
unzip
and
I
didn't
really
feel
like
I
needed
those
in
wordpress.
So
here
we
go.
A
I
pull
out
a
bun
ubuntu
and
get
this
stuff
unpack
it
all
into
export
themes
and
export,
plugins
and
stuff
like
that,
and
there
is
a
little
bit
of
customization
that
needs
to
be
added
to
this
s3
endpoint,
because
remember
I'm
doing
this
on
the
cheap,
and
so
I
don't
really
want
to
be
paying
an
s3
bill
every
month
and
having
stuff
go
in
and
out
of
my
house,
so
I'm
actually
using
a
set
object,
gateway,
and
so
my
next,
oh
that
says
my
sequel
from
operator,
but
it
shouldn't.
A
A
A
So
we've
got
revisions,
we've
got
replica,
sets,
we've
got
deployments,
we've
got,
services,
get
all,
doesn't
actually
get
all.
A
So
for
stuff
to
content
uploads,
I
rewrite
it
and
send
it
to
the
s3
service
and
for
everything
else.
I
rewrite
things
and
send
it
to
the
to
a
k
native
the
creative
external
service,
and
I
set
the
host
name
to
the
that
of
the
candidate
service.
So
I
could
be
using
domain
mapping
for
this.
But
since
I
want
some
pieces
of
the
url
to
go
to
one
service
and
some
pieces
to
go
somewhere
else,
I
use
the
contour
http
proxy,
and
so
this
is
working.
My
media
uploads
work.
B
A
Okay
and
so
there's
a
cropped
image
of
my
head,
which
I
use
for
testing
and
so
yeah,
that's
all
working.
A
A
And
I
have
a
you
know,
and
I
have
one
instance
of
this,
but
I
can
also
actually.
A
A
A
A
A
So
now,
if
we
open
up
the
blog,
it's
going
to
take
a
little
bit
longer.
A
And
a
little
bit
longer
and
a
little
bit
longer
and
eventually
you'll
get
upstream
request
timeout,
which
is
on
voice,
speak
for
it
took
more
than
the
15
seconds
I
expected,
and
eventually
it
will
start
up
and
it
will
work
and
then
everything
is
quick
and
so
forth
again,
so
you
know
going
and
loading
this
post.
You
know
everything
works,
quick
as
long
as
the
container
sticks
around
and
then
as
soon
as
the
container
goes
away.
A
So
it's
great
that
you
can
just
take
one
of
these
things
and
ship
it
in
here
and
then
you're
like.
Why
is
cold
start
so
bad
and
it
turns
out
if
we
actually
go
in
and
look
at
that
entry
point
every
time
it's
starting
up.
It's
discovering!
Oh
wait.
I
need
to
do
this.
Let
me
tar
up
everything
in
these
file
paths
and
copy
it
over
to
a
new
directory.
A
What
if,
instead
we
did
that
once
and
we
built
it
into
the
docker
image
oops,
and
so
if
we
go
and
look
at
my
actual
latest
docker
file.
A
Oh
let's
look
at
me
here
we
go,
you
can
see
at
the
end.
I
run
the
entry
point
with
the
command
line.
True,
which
does
that
copy
once
and
then
you
don't
have
to
copy
it
every
single
time,
and
so
if
we
go,
if
we
go
back
and
switch
back
to
wordpress
15.
A
We
will
close
that
and
now
we
can
see
that
rather
than
upstream
upstream
request,
timeout
and
taking
about
20
seconds
or
so
to
start,
it's
still
an
annoyingly
long
cold
start,
and
I
am
looking
forward
to
all
the
magic
that
jules
wants
to
do
to
make
this
stuff
faster,
there's,
probably
some
stuff
in
building
the
image
that
could
be,
could
make
it
faster
too,
but
it
actually
loads
within
the
timeout.
A
And
so
the
last
thing
was
you
know,
I
said:
hey
I'm
going
to
live
with
this
and
do
upgrades,
and
so
if
we
go
to
the
wordpress
dashboard
right
now,
everything
is
actually
up
to
date,
but
wordpress
will
actually
notify
you,
hey.
You
need
to
reinstall.
You
know
it
offers
to
reinstall
this.
A
You
know
wordpress
version,
but
remember
if
someone
stops
looking
at
the
blog
for
five
minutes,
we're
going
to
delete
all
of
the
pods
and
now
so
that
reinstall
is
not
really
going
to
stick,
but
instead
in
here
we've
actually
got
everything
versioned.
So
I
just
need
to
build
a
new
image.
A
You
can
see
that
right
now,
I'm
sticking
with
wordpress57
and
we'll
pick
up
the
minor
versions.
There,
if
the
nanospace
theme
or
the
s3
uploads
theme,
has
a
newer
version.
I
need
to
go
in
there
manually,
but
the
nice
thing
is:
I've
got
git
tracking.
All
of
this,
so
there's
no
like.
Oh
what
happened,
how
do
I
go
back
and
yeah
and
it
scales
on
requests?
So
if
someone
wants
to
load
test,
my
blog,
it
should
work
just
fine,
and
actually
that
makes
me
think
of
one
more
thing.
A
I
should
probably
do.
I've
got
container
concurrency
set
to
100..
Let's
set
that
to
10,
so
that
if
someone
wants
to
load
test
it,
we
really
get
more
pods
spinning
up.
A
And
so
in
a
few
minutes
we'll
have
that
working
but
yeah,
that's
that's!
Basically
it
if
anyone's
got
questions
or
wants
to
you
know,
you
know,
wants
to
ask
how'd
you
do
this
or
that
looks
like
it's
up
and
running.
So,
let's
see
two
three.
A
And
the
old
one's
shutting
down-
and
I
don't
know
I
actually
really
like
looking
at
this
stuff
in
the
ui.
So
if
anyone
does
want
to
throw
a
load
test
at
it,
I've
got
gigabit,
so
you
can
probably
squash
squash
these
dells
first.
A
Yeah
go
for
it
if
anyone's
got
hay
or
siege
or
something
like
that
installed.
The
site
is
off
by
one.dev,
with
https
and
so
yeah
cert
manager,
cert
manager,
manager's,
managing
that
and
yeah.
A
Oh
and
if
you're
curious,
I've
actually
made
my
home
case
config
repo
public,
I'm
in
the
process
of
migrating
everything
to
get
ops
using
flux,
cd,
but
this
stuff
isn't
there
yet.
A
Oh-
and
I
guess
the
one
other
fun
little
hack
is,
this
is
actually
something
that
I
built
for
k
native,
but
this
is
a
really
cheap
and
cheerful
log
aggregator.
So
we
can
actually
go
in
and
look
at
the
wordpress
logs.
A
I
complain
about
this
a
little
on
my
blog,
because
these
are
all
json
logs,
and
so
I
get
lots
of
really
cool
information
here
and
they
are
super
hard
to
read.
So
I
guess
this
one
is
about
successfully
creating
the
logger,
which
isn't
too
interesting.
Cue
container
is
starting
somewhere
in.
A
A
Actually,
I'm
not
sure
why
it
says
that,
because
it
looks
like
it's
running
wordpress
15
here,
which
is
the
one
that
was
fixed
so
yeah,
probably
my
next
fun
project
is
going
to
be
a
log
viewer
for
those,
because
I
don't
really
want
to
run
a
whole
elk
stack.
Oh
nice,
someone
got
the
load
up
cool.
A
B
Well,
folks
are
thinking
about
their
questions.
I
will
be
launching
a
poll
if
everyone
could
provide
also
some
feedback.
That's
really
helpful.
With
these
meetups
and
evan,
I'm
wondering
if
you
saw
there
was
a
question
in
the
chat.
B
A
Yes
from
kyle,
the
question
was:
how
easy
is
it
to
set
up
seth
as
an
s3
server,
so
I'm
actually
using
rook
to
manage
seth,
and
let
me
see.
A
But
so
you
need
to
create
one
of
these
and
set
the
values
appropriately,
which
is
kind
of
annoying.
And
then
you
just
create
a
ceph
object,
store.
A
A
A
A
A
A
A
I'm
the
question
was
the
logging
thing,
so
the
basic
logging
thing
is
pretty
much.
If
you
go
to
canada,
actually,
I'm
going
to
use
the
new
one.
A
That
folks
have
been
working
on
that
omar
was
talking
about
earlier
and
in
the
administration
guide,
there's
a
section
on
logging,
and
this
is
basically
the
setup
that
I've
got
with
a
collector
and
a
shared
volume
with
nginx.
A
If
you
want
to
actually
see
what
I'm
doing
it's
under
metrics,
I
have
a
fluid
bit
set
up.
The
one
extra
thing
is
that
the
collector,
I
also
have
a
little
log,
rotate
container
running,
because
otherwise
I
run
out
of
space.
I
put
like
you
know:
it's
a
40,
gig
volume
or
something
like
that,
and
so
log
rotate
is
how
I'm
getting
those
extra
things
and
it
doesn't
actually
work
great
with
nginx,
because
the
dot
log
it
recognizes
the
suffix,
but
all
the
other
ones.
A
It's
like
it's
binary
and
you
download
it.
Although
viewing
the
web
browser
is
painful
enough
that
downloading
it
isn't
that
much
worse.
A
Cert
manager,
the
circ
manager,
is
actually
for
external
ssl
internally.
I
think
it's
just
a
self-signed
cert
and
there
was
one
thing
I
needed
to
change
just
a
little
bit
so
you'll
see
there's
this
s3
endpoint
and
you
need
to
override
the
endpoint
parameter
to
get
it
to
point
away
from
s3
and
get
it
to
point
to
your
own
aws
host,
which
is
in
this
case.
A
And
that
stuff
is
actually
not
exposed
to
the
outside
world,
except
through
that
http
proxy.
So
I
could
probably
show
you
the
password
and
stuff
for
that,
but
I'm
not
going
to
just
because.
B
A
Wordpress,
oh,
this
is
copying
a
little
bit
of
extra
stuff
and
forgotten.
I
did
that
and
but
here
is
aws
hosts
an
aws
port
from
a
config
map.
A
And
oh,
this
is
the
one
other
piece
that
I
forgot
earlier
for
carlos.
That
you
need
is
an
object
bucket
claim
to
say
how
big
your
s3
bucket
is,
and
I
set
it
to
five
gigs
for
now,
because
I
can't
really
imagine
uploading
more
than
five
gigs
of
images.
But
I'm
sure
when
I
do,
I
will
figure
that
out.
B
A
So
this
is
not
all
scale
to
zero,
just
to
be
real
clear.
Let's
see
if
we
go
back
to
wordpress
and
we
look
at
the
pods.
A
Let's
see,
I
don't
think
you
actually
broke
it,
but
you
did
manage
to
get
45
paws
running.
It
looks
like
things
got
pending.
A
A
A
A
Point
I'm
gonna
have
to
go
in
and
debug
later
yeah.
I
don't
think
we
want
to
move
from
a
static
static
site
generator
to
wordpress,
though
I
I
picked
wordpress,
mostly
to
prove
that
it
could
work
and
not
to
not
as
a
recommended.
A
Yeah,
I
should
probably
set
max
pods
and
probably
also
change
container
concurrency
back
up
from
10..
Well,
if
necessary,
I
can
always
cut
things
at
the
router
and
then
fix
it.