Slide 1

Slide 1 text

@k2r2bai Introduction to Kubernetes-based Service, Framework and Project Hacktoberfest in DigitalOcean Hsinchu

Slide 2

Slide 2 text

@k2r2bai About Me ⽩白凱仁(Kyle Bai) • RDSS at inwinSTACK. • Interested in emerging technologies. • Kubernetes Projects Contributor(100+ PR). • Certified Kubernetes Administrator. • CNTUG(Cloud Native Taiwan User Group) co-organizer @kairen([email protected]) https://kairen.github.io/

Slide 3

Slide 3 text

@k2r2bai What is ‘Cloud Native’(or K8s-based service)? Cloud native computing uses an open source software stack to be: • Containerized. • Dynamically orchestrated. • Microservices oriented.

Slide 4

Slide 4 text

@k2r2bai Each part (applications, processes, etc) is packaged in its own container. This facilitates reproducibility, transparency, and resource isolation. Containerized

Slide 5

Slide 5 text

@k2r2bai Applications are segmented into microservices. This significantly increases the overall agility and maintainability of applications. Microservices oriented

Slide 6

Slide 6 text

@k2r2bai Each part is actively scheduled and managed to optimize resource utilization, and microservices-oriented to increase the overall agility and maintainability of applications. Dynamically orchestrated

Slide 7

Slide 7 text

@k2r2bai “Kubernetes is becoming the Linux of the cloud” - Jim Zemlin, Linux Foundation

Slide 8

Slide 8 text

@k2r2bai Kubernetes System Layers Nucleus: API and Execution Application Layer: Deployment and Routing Governance Layer: Automation and Policy Enforcement Interface Layer: Client Libraries and Tools Ecosystem Container Runtime Network Plugin Volume Plugin Image Registry Cloud Provider Identity Provider Device Plugin

Slide 9

Slide 9 text

Governance Layer: Automation and Policy Enforcement (APIs optional and pluggable) Application Layer: Deployment and Routing (APIs required and pluggable) Nucleus: API and Execution (APIs required and not pluggable) CronJob batch/ v2alpha1 Job batch/v1 Deployment apps/v1 DaemonSet apps/v1 Pod core/v1 ReplicaSet apps/v1 StatefulSet apps/v1 ReplicationController core/v1 Endpoints core/v1 Ingress extensions/v1beta1 Service core/v1 ConfigMap core/v1 Secret core/v1 PersistentVolumeClaim core/v1 StorageClass storage/v1 ControllerRevision apps/v1 Event core/v1 LimitRange core/v1 ValidatingWebHookConfiguration admissionregistration/v1alpha1 HorizontalPodAutoscaler autoscaling/v1 APIService apiregistration/v1beta1 PodDisruptionBudget policy/v1beta1 PodPreset settings/v1alpha1 PodSecurityPolicy extensions/v1beta1 CertificateSigningRequest certificates/v1beta1 ClusterRole rbac/v1beta1 ClusterRoleBinding rbac/v1beta1 LocalSubjectAccessReview authorization/v1 Namespace core/v1 Node core/v1 PersistentVolume core/v1 ResourceQuota core/v1 Role rbac/v1beta1 RoleBinding rbac/v1beta1 SelfSubjectAccessReview authorization/v1 ServiceAccount core/v1 SubjectAccessReview authorization/v1 NetworkPolicy networking/v1 ComponentStatus core/v1 PriorityClass scheduling/v1alpha1 ClusterServiceBroker servicecatalog/v1beta1 ClusterServiceClass servicecatalog/v1beta1 ClusterServicePlan servicecatalog/v1beta1 ServiceInstance servicecatalog/v1beta1 ServiceBinding servicecatalog/v1beta1 MutatingWebHookConfiguration admissionregistration/v1alpha1 SelfSubjectRulesReview authorization/v1 TokenReview authentication/v1 CustomResourceDefinition apiextensions/v1beta1

Slide 10

Slide 10 text

@k2r2bai https://landscape.cncf.io/

Slide 11

Slide 11 text

@k2r2bai Google Container Engine

Slide 12

Slide 12 text

@k2r2bai Amazon Elastic Container Service

Slide 13

Slide 13 text

@k2r2bai Azure Kubernetes Service

Slide 14

Slide 14 text

@k2r2bai https://github.com/ramitsurana/awesome-kubernetes#installers https://caylent.com/50-useful-kubernetes-tools Other Kubespray RKE Kops Kube-aws Typhoon Kubicorn Docker for K8s LinuxKit Matchbox KubeNow Bootkube kubeadm-dind-cluster Kubernetes Deploy Tools Minikube PKS https://docs.google.com/spreadsheets/d/1LxSqBzjOxfGx3cmtZ4EbB_BGCxT_wlxW_xgHVVa23es/edit#gid=0

Slide 15

Slide 15 text

@k2r2bai Kubernetes Package Manager Tools

Slide 16

Slide 16 text

@k2r2bai Kubernetes Operators Pattern • An Operator is nothing more than a set of application-specific custom controllers. • the Operator monitors and analyzes the cluster, and based on a set of parameters, trigger a series of actions to achieve the desired state. https://coreos.com/operators/

Slide 17

Slide 17 text

@k2r2bai Kubernetes Custom Resources • A resource is an endpoint in the Kubernetes API that stores a collection of API objects of a certain kind. ex: Pod. • A custom resource is an extension of the Kubernetes API that is not necessarily available on every Kubernetes cluster. • Kubernetes provides two ways to add custom resources to your cluster: • CRDs • API Aggregation(custom apiserver)

Slide 18

Slide 18 text

@k2r2bai CRD(CustomResourceDefinition) • The CustomResourceDefinition API resource allows you to define custom resources. • Defining a CRD object creates a new custom resource with a name and schema that you specify. • Do not require programming

Slide 19

Slide 19 text

@k2r2bai Kubernetes Custom Controllers • Kubernetes 1.7 has added an important feature called Custom Controllers. • It enables developers to extend and add new functionalities, replace existent ones (like replacing kube-proxy for instance). • And of course, automate administration tasks as if they were a native Kubernetes component.

Slide 20

Slide 20 text

@k2r2bai Etcd Operator

Slide 21

Slide 21 text

Example: PA Firewall + Kubernetes • Provides Security and NAT custom resources. • Automatically sync the PA security and NAT policies.

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

@k2r2bai Operator Framework The Operator Framework is an open source project that provides developer and runtime Kubernetes tools, enabling you to accelerate the development of an Operator. • Operator SDK • Operator Lifecycle Management • Operator Metering https://github.com/operator-framework/operator-sdk

Slide 24

Slide 24 text

@k2r2bai

Slide 25

Slide 25 text

@k2r2bai

Slide 26

Slide 26 text

@k2r2bai Operators Across The Industry and many more …. https://github.com/operator-framework/awesome-operators

Slide 27

Slide 27 text

@k2r2bai The Kubeflow project is dedicated to making deployments of machine learning (ML) workflows on Kubernetes simple, portable and scalable. • Kubeflow’s goal is not to recreate other services, but to provide a straightforward way to deploy best-of-breed open-source systems for ML to diverse infrastructures. • Anywhere you are running Kubernetes, you should be able to run Kubeflow. Kubeflow

Slide 28

Slide 28 text

@k2r2bai • Easy, repeatable, po`able deployments on a diverse infrastructure (laptop <-> ML rig <-> training cluster <-> production cluster). • Deploying and managing loosely-coupled microservices. • Scaling based on demand. The Kubeflow mission + https://www.kubeflow.org/

Slide 29

Slide 29 text

@k2r2bai Inference ML Environment

Slide 30

Slide 30 text

@k2r2bai Kubernetes managing resources

Slide 31

Slide 31 text

@k2r2bai https://medium.com/@amina.alsherif/how-to-get-started-with-kubeflow

Slide 32

Slide 32 text

Serving Distributed Training Developer create model Katlib https://speakerdeck.com/masayaaoyama/introduction-to-kubeflow-0-dot-1-and-future-at-cloud-native-meetup-tokyo-number-2

Slide 33

Slide 33 text

@k2r2bai Knative extends Kubernetes to provide the missing building blocks that developers need to create modern, source-centric, container-based, cloud- native applications. Knative “Developed in close partnership with Pivotal, IBM, Red Hat, and SAP, Knative pushes Kubernetes-based computing forward by providing the building blocks you need to build and deploy modern, container- based serverless applications.”

Slide 34

Slide 34 text

@k2r2bai The Knative framework is built on top of Kubernetes and Istio which provide a an Application runtime (container based) and advanced network routing respectively. Kubernetes + Istio = Power

Slide 35

Slide 35 text

@k2r2bai

Slide 36

Slide 36 text

@k2r2bai Knative components focus on solving many mundane but difficult tasks such as: • Deploying a container. • Orchestrating source-to-URL workflows on Kubernetes. • Routing and managing traffic with blue/green deployment. • Automatic scaling and sizing workloads based on demand • Binding running services to eventing ecosystems. Knative Goals

Slide 37

Slide 37 text

@k2r2bai The following Knative components are currently available: • Build: Source-to-container build orchestration. • Serving: Request-driven compute that can scale to zero. • Eventing: Management and delivery of events. Knative Core Concepts

Slide 38

Slide 38 text

@k2r2bai

Slide 39

Slide 39 text

@k2r2bai

Slide 40

Slide 40 text

@k2r2bai https://github.com/kubeflow/kubeflow/issues/1317

Slide 41

Slide 41 text

@k2r2bai

Slide 42

Slide 42 text

@k2r2bai KubeEdge • KubeEdge is an open source system extending native containerized application orchestration and device management to hosts at Edge. • It is built upon Kubernetes and provides core infrastructure support for network, app. • Deployment and metadata sychronization between cloud and edge. https://kubeedge.io/

Slide 43

Slide 43 text

@k2r2bai

Slide 44

Slide 44 text

@k2r2bai Argo Argo is an open source container-native workflow engine for getting work done on Kubernetes. Argo is implemented as a Kubernetes CRD (Custom Resource Definition). • Define workflows where each step in the workflow is a container. • Run CI/CD pipelines natively on Kubernetes without configuring complex software development products. https://argoproj.github.io/argo

Slide 45

Slide 45 text

@k2r2bai

Slide 46

Slide 46 text

@k2r2bai Kanister A framework for data management in Kubernetes. It allows domain experts to define application-specific data management workflows through Kubernetes API extensions. https://github.com/kanisterio/kanister

Slide 47

Slide 47 text

@k2r2bai 2018 NA KubeCon+CloudNativeCon

Slide 48

Slide 48 text

@k2r2bai

Slide 49

Slide 49 text

@k2r2bai

Slide 50

Slide 50 text

@k2r2bai

Slide 51

Slide 51 text

@k2r2bai

Slide 52

Slide 52 text

@k2r2bai KAIREN OUT!! THANK YOU!!!