Introduction to Kubernetes-based Service, Framework and Project

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

Introduction to Kubernetes-based Service, Framework and Project

5a84ea9a0afaca03be45b87dde58e51c?s=128

Kyle Bai

December 23, 2018
Tweet

Transcript

  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(k2r2.bai@gmail.com) https://kairen.github.io/
  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 https://landscape.cncf.io/

  11. @k2r2bai Google Container Engine

  12. @k2r2bai Amazon Elastic Container Service

  13. @k2r2bai Azure Kubernetes Service

  14. @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
  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. https://coreos.com/operators/
  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 https://github.com/operator-framework/operator-sdk
  24. @k2r2bai

  25. @k2r2bai

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

  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 + https://www.kubeflow.org/
  29. @k2r2bai Inference ML Environment

  30. @k2r2bai Kubernetes managing resources

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

  32. 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

  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 https://github.com/kubeflow/kubeflow/issues/1317

  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. https://kubeedge.io/
  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. https://argoproj.github.io/argo
  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. https://github.com/kanisterio/kanister
  47. @k2r2bai 2018 NA KubeCon+CloudNativeCon

  48. @k2r2bai

  49. @k2r2bai

  50. @k2r2bai

  51. @k2r2bai

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