Slide 1

Slide 1 text

Introduction to Virtual Kubelet Anubhav Mishra Team Lead, Developer Advocacy @anubhavm

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Virtual Kubelet ● Open Sourced by Microsoft in 2017 ● Extend the Kubernetes API to serverless container platforms like ACI, Fargate, Google Containers. 4

Slide 5

Slide 5 text

5

Slide 6

Slide 6 text

6

Slide 7

Slide 7 text

7

Slide 8

Slide 8 text

8

Slide 9

Slide 9 text

9

Slide 10

Slide 10 text

10

Slide 11

Slide 11 text

11

Slide 12

Slide 12 text

VK 1.0 Coming this May!

Slide 13

Slide 13 text

13

Slide 14

Slide 14 text

EDITOR // Provider contains the methods required to implement a Virtual Kubelet provider type Provider interface { // Takes a Kubernetes Pod and deploys it within the provider CreatePod(ctx context.Context, pod *v1.Pod) error // Takes a Kubernetes Pod and updates it within the provider UpdatePod(ctx context.Context, pod *v1.Pod) error // Takes a Kubernetes Pod and deletes it from the provider DeletePod(ctx context.Context, pod *v1.Pod) error // Retrieves a pod by name from the provider (can be cached) GetPod(ctx context.Context, namespace, name string) (*v1.Pod, error) // Retrieves the logs of a container by name from the provider GetContainerLogs(ctx context.Context, namespace, podName, containerName string, tail int) (string, error) // Executes a command in a container in the pod, copying data between // in/out/err and the container's stdin/stdout/stderr ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error // Retrieves the status of a pod by name from the provider GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error) // Retrieves a list of all pods running on the provider (can be cached) GetPods(context.Context) ([]*v1.Pod, error) // Returns a resource list with the capacity constraints of the provider Capacity(context.Context) v1.ResourceList // Returns a list of conditions (Ready, OutOfDisk, etc), which is polled // periodically to update the node status within Kubernetes NodeConditions(context.Context) []v1.NodeCondition // Returns a list of addresses for the node status within Kubernetes NodeAddresses(context.Context) []v1.NodeAddress // Returns NodeDaemonEndpoints for the node status within Kubernetes. NodeDaemonEndpoints(context.Context) *v1.NodeDaemonEndpoints // Returns the operating system the provider is for OperatingSystem() string } 14 Provider Interface Use your imagination

Slide 15

Slide 15 text

Provider Definition ● Provide the back-end plumbing necessary to support the lifecycle management of pods, containers and supporting resources in the context of Kubernetes. ● Conform to the current API provided by Virtual Kubelet. ● Not have access to the Kubernetes API Server and has a well-defined callback mechanism for getting data like secrets or configmaps. 15

Slide 16

Slide 16 text

Extend Kubernetes workloads to any service you like! 16

Slide 17

Slide 17 text

17

Slide 18

Slide 18 text

Providers ● Alibaba Cloud Elastic Container Instance (ECI) ● AWS Fargate ● Azure Batch ● Azure Container Instances (ACI) ● Kubernetes Container Runtime Interface (CRI) ● Huawei Cloud Container Instance (CCI) ● HashiCorp Nomad ● vSphere Integrated Containers 18

Slide 19

Slide 19 text

Demo

Slide 20

Slide 20 text

www.hashicorp.com [email protected] Thank you @anubhavm