A Kubernetes story: Phippy goes to the zoo
Articles Blog

A Kubernetes story: Phippy goes to the zoo

August 24, 2019


>>Phippy Goes To The Zoo,
A Kubernetes Story. “I’m bored Aunt Phippy.” Zee slouched further
down on the couch. “What are we going to do today?”>>”Why not go see the animals,”
said Phippy with a smile. “We’ll go to the zoo.”>>”Yeah,” Zee let out a whoop
and ran to find some shoes. The first animals they came upon, were the size of
squirrels, furry and blue. Each little animal carried a tiny box as they unceasingly
zipped back and forth. “Those,” said Phippy, “Are Pods. All day and all night they run back and forth carrying their
little containers.”>>”Is that all they do Aunt Phippy?”>>”See, for their entire lives, that’s all the pods do. They run.” In Kubernetes, Pods are responsible
for running your containers. Every pod holds
at least one container and controls the execution
of that container. When they containers exit, the Pod dies too.>>As Phippy and Zee walked on, they saw a large glass enclosure. Pressed against the window was a line of happy little meerkat faces.>>”Those are the
ReplicaSet,” said Phippy.>>As Zee watched, the face on the right grinned wildly and tipped
itself off the ledge. In unison, the others hopped
over to fill the space, and then an identical meerkat
scurried up on the left side.>>”Every time
one little replica falls, another one hops right
up,” explained Phippy. A ReplicaSet ensures that a set of identically configured pods are running at the desired replica count. If a pod drops off, the replica set brings
a new one online as a replacement.>>Walking further, Zee pointed out
a clump of burrows and warrens. While there were plenty of signs
that the area was inhabited, neither Phippy nor Zee could
see a single movement.>>”The secrets are in
here,” said Phippy, but you can’t see them without
these decoder glasses.”>>Zee took the pair of
glasses Phippy offered, slid them on and blushed. “Oh my, I think I’m ready
to go on now Aunt Phippy.” Zee handed back the glasses
and onward they went.>>Secrets are used to store non-public information such as
tokens, certificates or passwords. Secrets can be attached to
pods at run-time so that sensitive configuration data can be stored securely in the cluster.>>A group of iguanas gathered near a large slingshot along
the shore of a pond. An island stood in
the center of the water. An iguana threw herself
into the slingshot and the other iguanas launched
the little beast toward the island.>>”The Deployments release
a group onto the island. Right now, they’re trying to get
three out there,” said Phippy.>>At that moment,
another iguana rocketed into the air but missed the island with
a colossal splash in the pond.>>Phippy said, “If they miss, they just keep trying until
they get as many as they need.” A Deployment is a higher
order abstraction that controls deploying and
maintaining a set of pods. Behind the scenes, it uses a
ReplicaSet to keep the pods running, but it offers sophisticated
logic for deploying, updating, and scaling a set
of pods within a cluster.>>Several stone pillars
arose from a grassy knoll, and at the top of
each, sat a vulture. As Zee and Phippy watched, one vulture spread its wings and
flapped off into the distance. No sooner had one left, that another took its place. Zee asked, “What are they doing?”>>”Those are
DaemonSets,” said Phippy. “They make sure to
occupy every pillar, rain or shine day or night. I bet that if we added a new pillar, a new bird would land on
it faster than you could say cube cuddle,” chuckled Phippy. DaemonSets provide a way
to ensure that a copy of a pod is running on
every node in the cluster. As a cluster grows and shrinks, the DaemonSet spreads
these specifically labeled pods across all of the nodes.>>As they walked on, they saw an aquarium with
an enormous reef, edge to edge. It appeared that the rock would keep anything from passing from
one side to the other. Zee watched as hundreds of tiny fish made a dash for the center
of the face of the rock. At full speed, the fish swim into
a hole bored into the rock face, and momentarily vanished from sight. Zee let out a gasp. Multicolored flashes erupted from
the opposite side of the coral. Instead of coming out
of a single hole, the fish seemed to materialize from tiny fissures all over
the far side of the rock.>>”Ingresses are beautiful,”
said a dreamy eyed Phippy.>>Enchanted, Zee muttered, “Uh huh.”>>Ingresses provide a way to declare that traffic ought
to be channeled from the outside of the cluster into destination points
within the cluster. One single external
Ingress point can accept traffic destined to
many different internal surfaces.>>Zee pointed to the raccoons sprawled motionless in
the next enclosure. “What’s wrong with them?”
Suddenly, one sprung to its feet, did jumping jacks, then settled
back down for another nap.>>”Those are CronJobs,” said Phippy. Mostly, they just sleep. But periodically, they spring into
action to do a specific job.”>>As she spoke,
another bolted upright, grabbed a broom, swept the entire enclosure and then
dropped off to sleep again. “Aunt Phippy, can I bring
that one home to clean my room?” Phippy laughed as they walked on.>>CronJobs provide a method for
scheduling the execution of pods. They are excellent for running
periodic tasks like backups, reports, and automated tests.>>Zee halted abruptly. In the distance,
a black railed fence arose. The arches above the pen
were marked “CRD”. Between the bars, Zee could make
out some peculiar critters. A giraffe with a hippopotamus head, a snake with raccoon ears, a lion with a beavers tail, a unicorn with no horn. Zee wasn’t sure she liked
the looks of that place. “Oh,” said Phippy, a look
of concern on her face. “Look it’s lunchtime,
we had better head home.” With a look of
mild relief, Zee complied. “Can we stop at Captain Cube’s
Shake Shop on the way out?” Custom Resource Definitions
or CRDs provide an extension mechanism
that cluster operators and developers can use to create
their own resource types.>>Zee you later.

Leave a Reply

Your email address will not be published. Required fields are marked *