Khaled
Khaled

Reputation: 8583

Kubernetes Deployments, Pod and Container concepts

I have started recently getting familiar with Kubernetes, however while I do get the concept I have some questions I am unable to answer clearly through Kubernete's Concept and Documentation, and some understandings that I'd wish to confirm.

Appreciate your input.

Upvotes: 6

Views: 2006

Answers (2)

pr-pal
pr-pal

Reputation: 3558

Pod is an abstraction provided by Kubernetes and it corresponds to a group of containers which share a subset of namespaces, most importantly the network namespace. For instances the applications running in these containers can interact like the way applications in the same vm would interact, except for the fact that they don't share the same filesystem hierarchy.

The workloads are run in the form of pods, but POD is a lower level abstraction. The workloads are typically scheduled in terms of Kubernetes Deployments/ Jobs / CronJobs / Daemonsets etc which in turn create the Pods.

Upvotes: 0

pagid
pagid

Reputation: 13877

your question is actually too broad for StackOverflow but I'll quickly answer before this one is closed.

Maybe it get's clearer when you look at the API documentation. Which you could read like this:

A Deployment describes a specification of the desired behavior for the contained objects. This is done within the spec field which is of type DeploymentSpec.

A DeploymentSpec defines how the related Pods should look like with a templatethrough the PodTemplateSpec

The PodTemplateSpec then holds the PodSpec for all the require parameters and that defines how containers within this Pod should look like through a Container definition.

This is not a punchy oneline statement, but maybe makes it easier to see how things relate to each other.

Related to the criteria on what's a good size and what's too big for a Pod or a Container. This is very opinion loaded and the best way to figure that out is to read through the opinions on the size of Microservices.

To cover your last point - Kubernetes is able to monitor and manage containers, but the "user" is not able to schedule single containers. They have to be embedded in a Pod definion. You can of course access Container status and details per container (e.g. through kubeget logs <pod> -c <container> (details) or through the metrics API.

I hope this helps a bit and doesn't add to the confusion.

Upvotes: 3

Related Questions