Build Your First Kubernetes Cluster on vSpheredl.geekboy.pro:8080/VMworld 2019/CODE1151UR.pdf ·...
Transcript of Build Your First Kubernetes Cluster on vSpheredl.geekboy.pro:8080/VMworld 2019/CODE1151UR.pdf ·...
#vmworld
CODE1151UR
Build Your First Kubernetes Cluster on vSphere with Kubeadm
Kenny Coleman, VMware, Inc.
#CODE1151UR #k8s #kubeadm #gokennygo
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc.
Disclaimer
This presentation may contain product features or functionality that are currently under development.
This overview of new technology represents no commitment from VMware to deliver these features in any generally available product.
Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind.
Technical feasibility and market demand will affect final delivery.
Pricing and packaging for any new features/functionality/technology discussed or presented, have not been determined.
2
The information in this presentation is for informational purposes only and may not be incorporated into any contract. There is no commitment or obligation to deliver any items presented herein. VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 3
Kubernetes
The focus is on orchestration
Kubernetes functions as a master/worker relationship. Master roles require availability of
it’s services to keep quorum and schedule containers on worker nodes. Kubernetes
master components are critical to the overall health of the cluster.
VMworld 2019 Content: Not for publication or distribution
4©2019 VMware, Inc.
“Cool! Let’s Build Something”
- Every Engineer
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 5
Kubernetes is an abstraction layer that allows freedom for customization and tailoring for any platform. Run it in on your local machine, hosted in the cloud, turnkey cloud options, on-premises turnkey solutions, or completely custom to “do it yourself” (DIY).
ChoicesAnd choices and choices and choices
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 6
From The Kubernetes Documentation:
Best-practice “fast paths” for creating a minimum viable cluster.
Installing various nice-to-have addons, monitoring solutions, and cloud-specific addons, is not in scope.
Instead, we expect higher-level and more tailored tooling to be built on top of kubeadm.
Inference
Kubernetes is hard. Kubeadm is a tool that builds and upgrades clusters very well. The ability to operationalize Kubernetes beyond installation is dependent upon maturity of the organization.
KubeadmBuilt by the community for the community
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 7
From the Beginning…It all starts with the machine
Step 1.
Choose your distro:• Ubuntu, CentOS, CoreOS, SUSE, RancherOS, Talos Etc
Step 2.
Make your distro configurable as a template/AMI/etc. • Countless blogs with outdated methods?
• Will the template work with your environment? (ie Cloud Init vs Static IP)
• Process for updating templates
• Install Docker and Kubernetes components? Automate?
• Sizing requirements?
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 8
Installing KubernetesOr is there more research to do?
DOCS, BLOGS, AND MORE DOCS!
What container runtime do you want to use?
• Docker? Rkt? Or some other CRI compatible offering?
• Lessons learned from running Docker in production?
• What container runtime version is supported with the version of Kubernetes? What happens after yum install docker-ce?
Architecturally, single or multi-master? Stacked or separate etcd?
• Different paths in the docs
• Load Balancers, DNS, certificate sharing, and more to investigate
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 9
More research to weigh out the differences:
Is there an advantage to have overlay L2 vs L3?
kubeadm init requires special instructions for each solution.
What tools are available for troubleshooting?
How to manage at scale?
What is the scaling point?
NetworkingMore choices? Yes more!
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 10
Ready to Install?Not quite yet
Persistent Storage
Native in-tree driver to provide persistent backing for Kubernetes applications.
Continually evolving (API, process, plugin model)
Cloud/Provider Specific Configs and Initialization
Few examples of how to locate or properly configure flags on kubelet and manifests after cluster initialization
Few examples with kubeadm exist (even for major cloud providers)
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 11
The best install guide that’s still a work in progress
1. Creating an Ubuntu 18.04 LTS cloud image for cloning on VMware• Reliant on DHCP
2. Setting up K8s and the vSphere Cloud Provider using kubeadm• All the little details that seem to have not made it into the
actual docs. For both kubeadm and vSphere• Uses Flannel as the networking layer• Learn to automate from here
3. Using the vSphere Cloud Provider for K8s to dynamically deploy volumes• Storage Classes, apps, and the k8s dashboard.
Now Can We Install?Sure, Good Luck!
Credit to @myleasgray
VMworld 2019 Content: Not for publication or distribution
12©2019 VMware, Inc.
Want to See It in Action?You’re really selling it here…
DEMO TIME!
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 13
Kubernetes Worker
Operationalize the entire stack
Logging
Monitoring
Dependency Management
Security
Upgrades
Automated Repeatability
Regression Testing
Support
There’s more than installationMove to Production?
App App
Kubernetes Control Plane
Kubernetes Worker
App App
Infrastructure
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 14
Create Dynamic HA (multi-master) clusters (Beta in 1.15)
kubeadm for Windows (Alpha in 1.16)
Advanced kubeadm Configuration to match more Kubernetes parameters
Advanced kubeadm Configuration using Kustomize
Kubeadm Roadmap
VMworld 2019 Content: Not for publication or distribution
15©2019 VMware, Inc.
Get Started
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 16
Build your own vSphere ClusterClick to edit optional subtitle; delete or type a space if not needed
Kubernetes is complicated – use a pre-packaged solution that does this for you.
We recommend kubeadm for installation of kubernetes.
Stand up a cluster with kubeadm for free here: https://training.play-with-kubernetes.com/kubernetes-workshop/
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 17
The best install guide that’s still a work in progress
1. Creating an Ubuntu 18.04 LTS cloud image for cloning on VMware• Reliant on DHCP
2. Setting up K8s and the vSphere Cloud Provider using kubeadm• All the little details that seem to have not made it into the
actual docs. For both kubeadm and vSphere• Uses Flannel as the networking layer• Learn to automate from here
3. Using the vSphere Cloud Provider for K8s to dynamically deploy volumes• Storage Classes, apps, and the k8s dashboard.
Automated Steps to Install Kubernetes on CentOS7 with Kubeadm and vSphere
• https://gist.github.com/kacole2/200ae9362b010480f866d82a363c5327
Build your own vSphere Cluster
VMworld 2019 Content: Not for publication or distribution
©2019 VMware, Inc. 18
Learn about the features of VMware Enterprise PKS
- https://www.vmware.com/try-vmware/pks-hol-labs.html
Try out our VMware PKS Hands On LabFREE VMware HOL
VMworld 2019 Content: Not for publication or distribution
VMworld 2019 Content: Not for publication or distribution
VMworld 2019 Content: Not for publication or distribution