Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Getting Started with

Kubernetes
Rancher Labs Training

© 2018 Rancher Labs, Inc .Inc.


© 2018 Rancher Labs,
#rancherk8s
Today’s objectives
• Technical introduction to
Kubernetes using Rancher
• Keep the slides to a minimum
• Demo, then demo some more
• Questions are always welcome
• We won’t leave until all your
questions are answered!

1 © 2018 Rancher Labs, Inc.


Matthew Scheer Bill Maxwell
Community Advocate Principal Engineer
@matthew_scheer @CloudNautique

2 © 2018 Rancher Labs, Inc.


For the purpose of this training, we’re
assuming you understand basic Docker
concepts….

3 © 2018 Rancher Labs, Inc. #rancherk8s


Resources - docs
https://rancher.com/docs/rancher/v2.x/en/quick-start-guide/

4 © 2018 Rancher Labs, Inc. #rancherk8s


Resources - forums
http://forums.rancher.com

5 © 2018 Rancher Labs, Inc. #rancherk8s


Kubernetes Momentum

• Interest has in Kubernetes has


grown substantially
• K8s’s scalability and robust design
patterns have made it the platform
of choice for the industry.
• Large software companies (like
Github) have publicized their use of
K8s
• Many major IT vendors have
recently added k8s offerings

20
6 © 2018 Rancher Labs, Inc.
Kubernetes Momentum

21
7 © 2018 Rancher Labs, Inc.
Kubernetes
Operational
deployed
Challenges
- what’s next?

• With
Integrate
so soinmany
development
ways to deploy,
pipeline
how(CI/CD)
do I deploy consistently across different
•infrastructures?
Augment with logging, monitoring and alerting solution
• How do I implement and manage access control across multiple clusters (and
•namespaces)
Provision and manage multiple clusters for different projects and teams in a
reproducible way
• How do I integrate with a central authentication system?
•• How
Manage
do Iapartition
mix of clusters,
clustersboth on-premises
to more and
efficiently usecloud
my resources?
• How
DesigndoaI UX to onboard
manage developers
multi-tenancy, to Kubernetes
multiple dedicated andclusters
shared clusters?
• How do isnowflake
Handle make my deployments:
clusters highlydifferent
available? requirements for monitoring, logging, CI
• Ensure
integration, storage,policies
that security networking, etc.
are enforced across clusters/namespaces
•• Monitoring
Give central– Do I have sufficient
IT visibility visibility
and control overto detect
these and to troubleshoot issues?
clusters

22
14
8 © 2018 Rancher Labs, Inc.
Operational Challenges

Kuber net es development is moving at a ver y


fast pace:

• 50,685 commits within a 12 months period in 2017


• Top 5 of all Github projects for number of unique
developers contributing code
• More pull requests and issue comments than any other
project on GitHub

Source: https://gravitational.com/blog/kubernetes-release-cycle/
15
9 © 2018 Rancher Labs, Inc.
Operational Challenges

• There are no LTS versions


with Kubernetes
• New “minor” release every
3 month

Source: https://gravitational.com/blog/kubernetes-release-cycle/
16
10 © 2018 Rancher Labs, Inc.
Usability Challenges

• Kubernetes abstraction and


modularized separation of concerns
makes it powerful, but simultaneously
makes for a steeper learning curve
• Users can’t really leverage prior
Docker knowledge to write K8s
manifests

18
11 © 2018 Rancher Labs, Inc.
Rancher & Kubernetes - better together
Open source container manager
used to run Kubernetes in production
Rancher Kubernetes Distribution
 Easy-to-use interface for k8s Certified and supported distribution that closely
configuration and deployment follows the upstream Kubernetes project

 Infrastructure management across


multiple clusters and clouds Rancher Infrastructure Services
Storage, networking, load balancing,
 Automated deployment of the latest security, etc.
k8s release
 Workload, RBAC, policy, and project
management
 24x7 enterprise-grade support
7 © 2018 Rancher Labs, Inc.
Application Management
User Interface • App Catalog • CI/CD • Monitoring • Logging

Unified Kubernetes Management


Provisioning • Upgrades • RBAC • Policy • Security • Capacity • Cost
COMPLETE
CONTAINER
MANAGEMENT
PLATFORM

RKE EKS GKE AKS UKS PKS

Bare
metal

13 © 2018 Rancher Labs, Inc.


14 © 2018 Rancher Labs, Inc. 29
Kubernetes 101
 Pods
 Deployments
 Services
 Config maps
 Ingresses

15 © 2018 Rancher Labs, Inc. #rancherk8s


Pods
• Smallest unit that can be deployed in Kubernetes
• Consist of one or more containers that are always
scheduled together
• Each pod is given a unique IP address
• Containers in a pod can speak to each other via
localhost

8 © 2018 Rancher Labs, Inc. #rancherk8s


Pods are confusing
• If the explanation is confusing, don’t worry too much
• Pods typically contain only a single container
• Try to think of pods as containers for the remainder of
the training

17 © 2018 Rancher Labs, Inc. #rancherk8s


Replication controller and replica set
• Defines the desired scale and state of a group of pods
• SOT for driving the current state to the desired state (in
controller manager)

18 © 2018 Rancher Labs, Inc.


Deployments
• Level of abstraction above ReplicaSets
• Deployments create and update ReplicaSets
• Allow you to easily scale and perform rolling upgrades

19 © 2018 Rancher Labs, Inc. #rancherk8s


Services
• Define a DNS entry that can be used to refer to a group
of pods
• Provide a consistent endpoint for the group of pods
• Different types: nodePort, clusterIP, loadbalancer

20 © 2018 Rancher Labs, Inc. #rancherk8s


Config maps
• Allow storing of arbitrary configuration values and files
• Exposed in pods as either environment variables or as
local storage
• Decoupled storage of configuration from pod spec

21 © 2018 Rancher Labs, Inc. #rancherk8s


Ingresses
• Define how traffic outside the cluster is routed to inside
the cluster
• Used to expose Kubernetes services to the world
• Route traffic to internal services based on factors such
as host and path
• Ingress is usually implemented by a load balancer
(Nginx, HAProxy, AWS ELB, etc…)

22 © 2018 Rancher Labs, Inc. #rancherk8s


Rancher 2.0 101
1. Setting up Rancher
2. Clusters
3. Authentication & Security
4. Storage
5. Projects
6. Namespaces
7. Catalogs
8. CLI/API/Kubectl

© 2018 Rancher Labs, Inc.


Demo Time

24 © 2018 Rancher Labs, Inc.


Join other Rancher users in Slack

https://slack.rancher.io

#Kubernetes channel

15 © 2018 Rancher Labs, Inc.


Thank you
rancher.com/kubernetes

#rancherk8s

© 2018 Rancher
© 2018 Labs,
Rancher Inc .Inc.
Labs,
Download the eBook
Includes step-by-step instructions on
how to get started

info.rancher.com/deploying-scaling-
kubernetes-ebook

27 © 2018 Rancher Labs, Inc. #rancherk8s

You might also like