Introduction to Kubernetes-based Service, Framework and Project

5a84ea9a0afaca03be45b87dde58e51c?s=47 Kyle Bai
December 23, 2018

Introduction to Kubernetes-based Service, Framework and Project


Kyle Bai

December 23, 2018


  1. @k2r2bai Introduction to Kubernetes-based Service, Framework and Project Hacktoberfest in

    DigitalOcean Hsinchu
  2. @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(
  3. @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.
  4. @k2r2bai Each part (applications, processes, etc) is packaged in its

    own container. This facilitates reproducibility, transparency, and resource isolation. Containerized
  5. @k2r2bai Applications are segmented into microservices. This significantly increases the

    overall agility and maintainability of applications. Microservices oriented
  6. @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
  7. @k2r2bai “Kubernetes is becoming the Linux of the cloud” -

    Jim Zemlin, Linux Foundation
  8. @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
  9. 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
  10. @k2r2bai

  11. @k2r2bai Google Container Engine

  12. @k2r2bai Amazon Elastic Container Service

  13. @k2r2bai Azure Kubernetes Service

  14. @k2r2bai Other Kubespray RKE Kops Kube-aws Typhoon Kubicorn

    Docker for K8s LinuxKit Matchbox KubeNow Bootkube kubeadm-dind-cluster Kubernetes Deploy Tools Minikube PKS
  15. @k2r2bai Kubernetes Package Manager Tools

  16. @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.
  17. @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)
  18. @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
  19. @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.
  20. @k2r2bai Etcd Operator

  21. Example: PA Firewall + Kubernetes • Provides Security and NAT

    custom resources. • Automatically sync the PA security and NAT policies.
  22. None
  23. @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
  24. @k2r2bai

  25. @k2r2bai

  26. @k2r2bai Operators Across The Industry and many more ….

  27. @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
  28. @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 +
  29. @k2r2bai Inference ML Environment

  30. @k2r2bai Kubernetes managing resources

  31. @k2r2bai

  32. Serving Distributed Training Developer create model Katlib

  33. @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.”
  34. @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
  35. @k2r2bai

  36. @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
  37. @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
  38. @k2r2bai

  39. @k2r2bai

  40. @k2r2bai

  41. @k2r2bai

  42. @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.
  43. @k2r2bai

  44. @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.
  45. @k2r2bai

  46. @k2r2bai Kanister A framework for data management in Kubernetes. It

    allows domain experts to define application-specific data management workflows through Kubernetes API extensions.
  47. @k2r2bai 2018 NA KubeCon+CloudNativeCon

  48. @k2r2bai

  49. @k2r2bai

  50. @k2r2bai

  51. @k2r2bai

  52. @k2r2bai KAIREN OUT!! THANK YOU!!!