Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Kubernetes-based Service, Framework and Project

Kyle Bai
December 23, 2018

Introduction to Kubernetes-based Service, Framework and Project

Kyle Bai

December 23, 2018
Tweet

More Decks by Kyle Bai

Other Decks in Technology

Transcript

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

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

    overall agility and maintainability of applications. Microservices oriented
  5. @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
  6. @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
  7. 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
  8. @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
  9. @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/
  10. @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)
  11. @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
  12. @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.
  13. Example: PA Firewall + Kubernetes • Provides Security and NAT

    custom resources. • Automatically sync the PA security and NAT policies.
  14. @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
  15. @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
  16. @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/
  17. @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.”
  18. @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
  19. @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
  20. @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
  21. @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/
  22. @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
  23. @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