Slide 1

Slide 1 text

Google Cloud Platform Kubernetes: Understanding Pods vs. Containers Tim Hockin Principal Software Engineer @thockin

Slide 2

Slide 2 text

Google Cloud Platform We get a lot of questions about how best* to use Pods and Containers and replication in Kubernetes * There is no “best”, but you can’t decide what you need until you understand the options.

Slide 3

Slide 3 text

Google Cloud Platform Use-case: You are thirsty.

Slide 4

Slide 4 text

Google Cloud Platform Here, have some atomic particles: + - + - + + + + + + + + = = = = = = = = - - - - - - - -

Slide 5

Slide 5 text

Google Cloud Platform Are you satisfied? + - + - + + + + + + + + = = = = = = = = - - - - - - - -

Slide 6

Slide 6 text

Google Cloud Platform No. You can’t drink that*. + - + - + + + + + + + + = = = = = = = = - - - - - - - - * While fundamental to everything they are not helpful here.

Slide 7

Slide 7 text

Google Cloud Platform Here, have some hydrogen and oxygen: + - + - = - = = = = = = = = = = = = = = + - - - - - - -

Slide 8

Slide 8 text

Google Cloud Platform Are you satisfied? + - + - = - = = = = = = = = = = = = = = + - - - - - - -

Slide 9

Slide 9 text

Google Cloud Platform No. That is just a bunch of atoms*, you can’t drink that. * Atoms are very useful, but they don’t solve your current problem. + - + - = - = = = = = = = = = = = = = = + - - - - - - -

Slide 10

Slide 10 text

Google Cloud Platform Let me join those for you: = - = = = = = = = = = = = = = = + - - - - - - - + + - -

Slide 11

Slide 11 text

Google Cloud Platform Are you satisfied? = - = = = = = = = = = = = = = = + - - - - - - - + + - -

Slide 12

Slide 12 text

Google Cloud Platform No. That is some other atom. You need water. = - = = = = = = = = = = = = = = + - - - - - - - + + - -

Slide 13

Slide 13 text

Google Cloud Platform Let me compose them for you: H H O

Slide 14

Slide 14 text

Google Cloud Platform Are you satisfied? H H O

Slide 15

Slide 15 text

Google Cloud Platform No. That is water*, but it is just one molecule. H H O * H 2 O is a very useful composition of atoms (a molecule) that addresses your current problem, but only partially.

Slide 16

Slide 16 text

Google Cloud Platform Let me scale that for you: H H O H H O

Slide 17

Slide 17 text

Google Cloud Platform Are you satisfied? H H O H H O

Slide 18

Slide 18 text

Google Cloud Platform No, that’s not water any more. H H O H H O * H 4 O 2 isn’t even a stable compound.

Slide 19

Slide 19 text

Google Cloud Platform How about now? H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O H H O

Slide 20

Slide 20 text

Google Cloud Platform That’s pretty good. But you really wanted sugar* water. * C 12 H 22 O 11

Slide 21

Slide 21 text

Google Cloud Platform We already know that joining inside the molecule doesn’t work*. * C 12 H 24 O 12 is lactose monohydrate - not sugar water H H O

Slide 22

Slide 22 text

Google Cloud Platform I’ll just mix these together*: * A solution. H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 11 H 2 O C 12 H 22 O 11 H 2 O C 12 H 22 O 11 H 2 O C 12 H 22 O 11

Slide 23

Slide 23 text

Google Cloud Platform Are you satisfied? H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 11 H 2 O C 12 H 22 O 11 H 2 O C 12 H 22 O 11 H 2 O C 12 H 22 O 11

Slide 24

Slide 24 text

Google Cloud Platform No. That is way too sweet*. * Mixing in equal proportions is not always right. H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 1 1 H 2 O C 12 H 22 O 11 H 2 O C 12 H 22 O 11 H 2 O C 12 H 22 O 11 H 2 O C 12 H 22 O 11

Slide 25

Slide 25 text

Google Cloud Platform I’ll adjust the proportions: H 2 O C 12 H 22 O 11 H 2 O H 2 O H 2 O H 2 O C 12 H 22 O 11 H 2 O H 2 O H 2 O

Slide 26

Slide 26 text

Google Cloud Platform Are you satisfied? H 2 O C 12 H 22 O 11 H 2 O H 2 O H 2 O H 2 O C 12 H 22 O 11 H 2 O H 2 O H 2 O

Slide 27

Slide 27 text

Google Cloud Platform YES. H 2 O C 12 H 22 O 11 H 2 O H 2 O H 2 O H 2 O C 12 H 22 O 11 H 2 O H 2 O H 2 O

Slide 28

Slide 28 text

Google Cloud Platform How does this apply to Kubernetes?

Slide 29

Slide 29 text

Google Cloud Platform ● Particle = Process in a Container ○ Not very useful alone, but composable into many distinct forms ● Atom = Container ○ Useful on its own, but is also composable into something larger ● Molecule = Pod ○ Has a specific composition and behavior ○ Changing the composition changes the behavior ● Scaling an application does not mean scaling all Pods equally