0% found this document useful (0 votes)
9 views

Learn Kubernetes Basics _ Kubernetes

The document provides a comprehensive guide on learning Kubernetes basics, including creating a cluster using Minikube, deploying applications, exploring app components, exposing apps publicly, scaling, and updating them. It includes interactive tutorials for hands-on experience with Kubernetes concepts and tools like kubectl. The content emphasizes the importance of containerization and the orchestration capabilities of Kubernetes for managing applications across clusters.

Uploaded by

agathsyatechno
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Learn Kubernetes Basics _ Kubernetes

The document provides a comprehensive guide on learning Kubernetes basics, including creating a cluster using Minikube, deploying applications, exploring app components, exposing apps publicly, scaling, and updating them. It includes interactive tutorials for hands-on experience with Kubernetes concepts and tools like kubectl. The content emphasizes the importance of containerization and the orchestration capabilities of Kubernetes for managing applications across clusters.

Uploaded by

agathsyatechno
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

5/25/2021 Learn Kubernetes Basics | Kubernetes

Learn Kubernetes Basics


1: Create a Cluster
1.1: Using Minikube to Create a Cluster
1.2: Interactive Tutorial - Creating a Cluster
2: Deploy an App
2.1: Using kubectl to Create a Deployment
2.2: Interactive Tutorial - Deploying an App
3: Explore Your App
3.1: Viewing Pods and Nodes
3.2: Interactive Tutorial - Exploring Your App
4: Expose Your App Publicly
4.1: Using a Service to Expose Your App
4.2: Interactive Tutorial - Exposing Your App
5: Scale Your App
5.1: Running Multiple Instances of Your App
5.2: Interactive Tutorial - Scaling Your App
6: Update Your App
6.1: Performing a Rolling Update
6.2: Interactive Tutorial - Updating Your App

h of the basics of the Kubernetes cluster orchestration


e background information on major Kubernetes features
active online tutorial. These interactive tutorials let you
tainerized applications for yourself.

an learn to:

ation on a cluster.

ication with a new software version.


cation.

virtual terminal in your web browser that runs Minikube, a


ernetes that can run anywhere. There's no need to install
each interactive tutorial runs directly out of your web

tes do for you?


xpect applications to be available 24/7, and developers
ose applications several times a day. Containerization
se goals, enabling applications to be released and updated
ps you make sure those containerized applications run
ps them nd the resources and tools they need to work.
pen source platform designed with Google's accumulated
on, combined with best-of-breed ideas from the

Modules

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 1/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

(/docs/tutorials/kubernetes- (/docs/tutorials/kubernetes-
/) basics/deploy-app/deploy-intro/) basics/explore/explore-intro/)
2. Deploy an app 3. Explore your app
(/docs/tutorials/kubernetes- (/docs/tutorials/kubernetes-
/) basics/deploy-app/deploy-intro/) basics/explore/explore-intro/)

(/docs/tutorials/kubernetes- (/docs/tutorials/kubernetes-
basics/scale/scale-intro/) basics/update/update-intro/)
5. Scale up your app 6. Update your app
(/docs/tutorials/kubernetes- (/docs/tutorials/kubernetes-
basics/scale/scale-intro/) basics/update/update-intro/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 2/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

1 - Create a Cluster
1.1 - Using Minikube to Create a Cluster

a Kubernetes cluster is.


Minikube is.
ernetes cluster using an online terminal.

s Clusters
rdinates a highly available cluster of computers that
Summary:
o work as a single unit. The abstractions in Kubernetes Kubernetes cluster
oy containerized applications to a cluster without tying Minikube
to individual machines. To make use of this new model of
lications need to be packaged in a way that decouples them
osts: they need to be containerized. Containerized
more exible and available than in past deployment Kubernetes is a production-
pplications were installed directly onto speci c machines as grade, open-source platform
integrated into the host. Kubernetes automates the that orchestrates the placement
d scheduling of application containers across a cluster (scheduling) and execution of
ent way. Kubernetes is an open-source platform and is application containers within
y. and across computer clusters.

ster consists of two types of resources:

l Plane coordinates the cluster


the workers that run applications

Diagram

Node

Control Plane

Node Processes

bernetes Cluster

ne is responsible for managing the cluster. The Control


s all activities in your cluster, such as scheduling Control Planes manage the
ntaining applications' desired state, scaling applications, cluster and the nodes that are
ew updates. used to host the running
applications.
or a physical computer that serves as a worker machine
cluster. Each node has a Kubelet, which is an agent for
de and communicating with the Kubernetes control plane.
also have tools for handling container operations, such as
cker. A Kubernetes cluster that handles production tra c
nimum of three nodes.

y applications on Kubernetes, you tell the control plane to

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 3/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

ion containers. The control plane schedules the containers


ster's nodes. The nodes communicate with the control
Kubernetes API (/docs/concepts/overview/kubernetes-
control plane exposes. End users can also use the
directly to interact with the cluster.

ster can be deployed on either physical or virtual machines.


th Kubernetes development, you can use Minikube.
htweight Kubernetes implementation that creates a VM on
ne and deploys a simple cluster containing only one node.
able for Linux, macOS, and Windows systems. The Minikube
c bootstrapping operations for working with your cluster,
top, status, and delete. For this tutorial, however, you'll use
e terminal with Minikube pre-installed.

ow what Kubernetes is, let's go to the online tutorial and


ster!

ive Tutorial › (/docs/tutorials/kubernetes-basics/create-cluster/cluster-interactive/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 4/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

1.2 - Interactive Tutorial - Creating a


Cluster

Kubernetes cluster

inutes

teractive scenario is to deploy a local


ernetes cluster using minikube

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

Kubernetes cluster

inutes

teractive scenario is to deploy a local


ernetes cluster using minikube

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 5/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

Kubernetes cluster

inutes

teractive scenario is to deploy a local


ernetes cluster using minikube

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

Kubernetes cluster

inutes

teractive scenario is to deploy a local


ernetes cluster using minikube

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 6/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

odule 2 › (/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 7/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

2 - Deploy an App
2.1 - Using kubectl to Create a
Deployment

t application Deployments.
r rst app on Kubernetes with kubectl.

s Deployments
running Kubernetes cluster, you can deploy your
Summary:
plications on top of it. To do so, you create a Kubernetes Deployments
n guration. The Deployment instructs Kubernetes how to Kubectl
te instances of your application. Once you've created a
Kubernetes control plane schedules the application
ed in that Deployment to run on individual Nodes in the
A Deployment is responsible for
creating and updating instances
tion instances are created, a Kubernetes Deployment
of your application
uously monitors those instances. If the Node hosting an
wn or is deleted, the Deployment controller replaces the
instance on another Node in the cluster. This provides a
chanism to address machine failure or maintenance.

ation world, installation scripts would often be used to start


they did not allow recovery from machine failure. By both
plication instances and keeping them running across Nodes,
oyments provide a fundamentally di erent approach to
agement.

g your rst app on Kubernetes

Node
containerized app

Deployment
Control Plane
node processes

rnetes Cluster

nd manage a Deployment by using the Kubernetes


terface, Kubectl. Kubectl uses the Kubernetes API to Applications need to be
cluster. In this module, you'll learn the most common packaged into one of the
ds needed to create Deployments that run your supported container formats in
Kubernetes cluster. order to be deployed on
Kubernetes
a Deployment, you'll need to specify the container image
on and the number of replicas that you want to run. You
nformation later by updating your Deployment; Modules 5
kubernetes-basics/scale/scale-intro/) and 6
kubernetes-basics/update/update-intro/) of the bootcamp
can scale and update your Deployments.

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 8/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

ployment, you'll use a hello-node application packaged in a


r that uses NGINX to echo back all the requests. (If you
creating a hello-node application and deploying it using a
n do that rst by following the instructions from the Hello
(/docs/tutorials/hello-minikube/)).

ow what Deployments are, let's go to the online tutorial and


pp!

ive Tutorial › (/docs/tutorials/kubernetes-basics/deploy-app/deploy-interactive/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 9/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

2.2 - Interactive Tutorial - Deploying an


App
execution unit of a Kubernetes application. Each Pod represents a part of a
unning on your cluster. Learn more about Pods
orkloads/pods/).

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 10/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

n app

inutes

enario is to help you deploy your first app


ing kubectl. You will learn the basics about
w to interact with your application.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

n app

inutes

enario is to help you deploy your first app


ing kubectl. You will learn the basics about
w to interact with your application.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 11/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

odule 3 › (/docs/tutorials/kubernetes-basics/explore/explore-intro/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 12/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

3 - Explore Your App


3.1 - Viewing Pods and Nodes

t Kubernetes Pods.
t Kubernetes Nodes.
ot deployed applications.

tes Pods Summary:


d a Deployment in Module 2 (/docs/tutorials/kubernetes-
Pods
p/deploy-intro/), Kubernetes created a Pod to host your
Nodes
nce. A Pod is a Kubernetes abstraction that represents a
Kubectl main commands
more application containers (such as Docker), and some
s for those containers. Those resources include:

age, as Volumes
, as a unique cluster IP address A Pod is a group of one or more
n about how to run each container, such as the container application containers (such as
on or speci c ports to use Docker) and includes shared
storage (volumes), IP address
application-speci c "logical host" and can contain di erent
and information about how to
ainers which are relatively tightly coupled. For example, a
run them.
e both the container with your Node.js app as well as a
er that feeds the data to be published by the Node.js
ontainers in a Pod share an IP Address and port space, are
d and co-scheduled, and run in a shared context on the

mic unit on the Kubernetes platform. When we create a


Kubernetes, that Deployment creates Pods with containers
pposed to creating containers directly). Each Pod is tied to
it is scheduled, and remains there until termination
tart policy) or deletion. In case of a Node failure, identical
ed on other available Nodes in the cluster.

rview

Containers should only be


s on a Node. A Node is a worker machine in Kubernetes scheduled together in a single
er a virtual or a physical machine, depending on the cluster. Pod if they are tightly coupled
naged by the Master. A Node can have multiple pods, and and need to share resources
master automatically handles scheduling the pods across such as disk.
cluster. The Master's automatic scheduling takes into
able resources on each Node.

s Node runs at least:

process responsible for communication between the


Master and the Node; it manages the Pods and the
running on a machine.
https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 13/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

runtime (like Docker) responsible for pulling the container


a registry, unpacking the container, and running the

erview

hooting with kubectl A node is a worker machine in


cs/tutorials/kubernetes-basics/deploy-app/deploy-intro/), Kubernetes and may be a VM or
command-line interface. You'll continue to use it in Module physical machine, depending on
ion about deployed applications and their environments. the cluster. Multiple Pods can
on operations can be done with the following kubectl run on one Node.

t - list resources
scribe - show detailed information about a resource
gs - print the logs from a container in a pod
ec - execute a command on a container in a pod

e commands to see when applications were deployed, what


uses are, where they are running and what their
re.

w more about our cluster components and the command


our application.

ive Tutorial › (/docs/tutorials/kubernetes-basics/explore/explore-interactive/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 14/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

3.2 - Interactive Tutorial - Exploring


Your App

our app

inutes

ou will learn how to troubleshoot


cations using the kubectl get, describe, logs
ds.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

our app

inutes

ou will learn how to troubleshoot


cations using the kubectl get, describe, logs
ds.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 15/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

our app

inutes

ou will learn how to troubleshoot


cations using the kubectl get, describe, logs
ds.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

our app

inutes

ou will learn how to troubleshoot


cations using the kubectl get, describe, logs
ds.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 16/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

odule 4 › (/docs/tutorials/kubernetes-basics/expose/expose-intro/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 17/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

4 - Expose Your App Publicly


4.1 - Using a Service to Expose Your App

t a Service in Kubernetes
d how labels and LabelSelector objects relate to a Service
application outside a Kubernetes cluster using a Service

f Kubernetes Services
(/docs/concepts/workloads/pods/) are mortal. Pods in fact
Summary
docs/concepts/workloads/pods/pod-lifecycle/). When a Exposing Pods to
s, the Pods running on the Node are also lost. A ReplicaSet external tra c
workloads/controllers/replicaset/) might then dynamically Load balancing tra c
back to desired state via creation of new Pods to keep your across multiple Pods
ng. As another example, consider an image-processing Using labels
eplicas. Those replicas are exchangeable; the front-end
ot care about backend replicas or even if a Pod is lost and
aid, each Pod in a Kubernetes cluster has a unique IP
ds on the same Node, so there needs to be a way of A Kubernetes Service is an
conciling changes among Pods so that your applications abstraction layer which de nes
tion. a logical set of Pods and enables
external tra c exposure, load
ernetes is an abstraction which de nes a logical set of Pods
balancing and service discovery
which to access them. Services enable a loose coupling
for those Pods.
ent Pods. A Service is de ned using YAML (preferred)
con guration/overview/#general-con guration-tips) or
ernetes objects. The set of Pods targeted by a Service is
ed by a LabelSelector (see below for why you might want a
ncluding selector in the spec).

od has a unique IP address, those IPs are not exposed


er without a Service. Services allow your applications to
rvices can be exposed in di erent ways by specifying a
ceSpec:

efault) - Exposes the Service on an internal IP in the cluster.


akes the Service only reachable from within the cluster.
Exposes the Service on the same port of each selected Node
er using NAT. Makes a Service accessible from outside the
g <NodeIP>:<NodePort> . Superset of ClusterIP.
er - Creates an external load balancer in the current cloud (if
and assigns a xed, external IP to the Service. Superset of

me - Maps the Service to the contents of the externalName


foo.bar.example.com`), by returning a CNAME record with its
roxying of any kind is set up. This type requires v1.7 or
ube-dns , or CoreDNS version 0.0.8 or higher.

n about the di erent types of Services can be found in the


/docs/tutorials/services/source-ip/) tutorial. Also see
cations with Services (/docs/concepts/services-
ect-applications-service).

e that there are some use cases with Services that involve
ector in the spec. A Service created without selector will
he corresponding Endpoints object. This allows users to
Service to speci c endpoints. Another possibility why there
or is you are strictly using type: ExternalName .

d Labels
https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 18/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

tra c across a set of Pods. Services are the abstraction that


and replicate in Kubernetes without impacting your
overy and routing among dependent Pods (such as the
ckend components in an application) is handled by
ces.

set of Pods using labels and selectors


overview/working-with-objects/labels), a grouping primitive
al operation on objects in Kubernetes. Labels are key/value
objects and can be used in any number of ways:

objects for development, test, and production


sion tags
object using tags

ached to objects at creation time or later on. They can be


ime. Let's expose our application now using a Service and
s.

ive Tutorial › (/docs/tutorials/kubernetes-basics/expose/expose-interactive/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 19/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

4.2 - Interactive Tutorial - Exposing Your


App

our app publicly

inutes

ou will learn how to expose Kubernetes


de the cluster using the kubectl expose
ll also learn how to view and apply labels to
ubectl label command.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

our app publicly

inutes

ou will learn how to expose Kubernetes


de the cluster using the kubectl expose
ll also learn how to view and apply labels to
ubectl label command.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 20/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

our app publicly

inutes

ou will learn how to expose Kubernetes


de the cluster using the kubectl expose
ll also learn how to view and apply labels to
ubectl label command.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

our app publicly

inutes

ou will learn how to expose Kubernetes


de the cluster using the kubectl expose
ll also learn how to view and apply labels to
ubectl label command.

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 21/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

odule 5 › (/docs/tutorials/kubernetes-basics/scale/scale-intro/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 22/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

5 - Scale Your App


5.1 - Running Multiple Instances of Your
App

p using kubectl.

application
modules we created a Deployment
Summary:
workloads/controllers/deployment/), and then exposed it Scaling a Deployment
vice (/docs/concepts/services-networking/service/). The
ted only one Pod for running our application. When tra c
l need to scale the application to keep up with user
You can create from the start a
Deployment with multiple
plished by changing the number of replicas in a
instances using the --replicas
parameter for the kubectl create
deployment command

verview

ployment will ensure new Pods are created and scheduled


ailable resources. Scaling will increase the number of Pods Scaling is accomplished by
ed state. Kubernetes also supports autoscaling (/docs/user- changing the number of replicas
-pod-autoscaling/) of Pods, but it is outside of the scope of in a Deployment.
ng to zero is also possible, and it will terminate all Pods of
ployment.

instances of an application will require a way to distribute


f them. Services have an integrated load-balancer that will
rk tra c to all Pods of an exposed Deployment. Services will
ously the running Pods using endpoints, to ensure the
y to available Pods.

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 23/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

multiple instances of an Application running, you would be


g updates without downtime. We'll cover that in the next
's go to the online terminal and scale our application.

ive Tutorial › (/docs/tutorials/kubernetes-basics/scale/scale-interactive/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 24/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

5.2 - Interactive Tutorial - Scaling Your


App

your app

inutes

teractive scenario is to scale a deployment


and to see the load balancing in action

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

your app

inutes

teractive scenario is to scale a deployment


and to see the load balancing in action

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 25/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

your app

inutes

teractive scenario is to scale a deployment


and to see the load balancing in action

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

your app

inutes

teractive scenario is to scale a deployment


and to see the load balancing in action

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 26/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

odule 6 › (/docs/tutorials/kubernetes-basics/update/update-intro/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 27/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

6 - Update Your App


6.1 - Performing a Rolling Update

olling update using kubectl.

n application
plications to be available all the time and developers are
Summary:
oy new versions of them several times a day. In Kubernetes Updating an app
rolling updates. Rolling updates allow Deployments'
ace with zero downtime by incrementally updating Pods
ew ones. The new Pods will be scheduled on Nodes with
es. Rolling updates allow
Deployments' update to take
module we scaled our application to run multiple instances.
place with zero downtime by
ment for performing updates without a ecting application
incrementally updating Pods
efault, the maximum number of Pods that can be
instances with new ones.
ng the update and the maximum number of new Pods that
s one. Both options can be con gured to either numbers or
Pods). In Kubernetes, updates are versioned and any
ate can be reverted to a previous (stable) version.

pdates overview

tion Scaling, if a Deployment is exposed publicly, the


balance the tra c only to available Pods during the update. If a Deployment is exposed
is an instance that is available to the users of the publicly, the Service will load-
balance the tra c only to
available Pods during the
allow the following actions:
update.
application from one environment to another (via
mage updates)
previous versions
Integration and Continuous Delivery of applications with
ime

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 28/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

nteractive tutorial, we'll update our application to a new


perform a rollback.

ive Tutorial › (/docs/tutorials/kubernetes-basics/update/update-interactive/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 29/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

6.2 - Interactive Tutorial - Updating Your


App

our app

inutes

enario is to update a deployed application


mage and to rollback with the rollout undo

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

our app

inutes

enario is to update a deployed application


mage and to rollback with the rollout undo

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 30/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

our app

inutes

enario is to update a deployed application


mage and to rollback with the rollout undo

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

our app

inutes

enario is to update a deployed application


mage and to rollback with the rollout undo

a pre-configured Linux environment that can be used


you can type commands). Clicking on the blocks of
ENTER sign will execute that command in the

atulations on
eting the module
ear what you thought of the module

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 31/32
5/25/2021 Learn Kubernetes Basics | Kubernetes

netes Basics › (/docs/tutorials/kubernetes-basics/)

https://kubernetes.io/docs/tutorials/kubernetes-basics/_print/ 32/32

You might also like