Implementation - unofficial Kubernetes (2024)

  • BAGRANT 0607
  • Janetkuotitle: Implementations

{: toc}

What is an implementation?

INImplementationOffers to explain updatesBallInReplicaset(The next generation of replication check). You only need to describe the desired mode in an implementation object and implementation control will change the actual status in the desired status in a controlled speed for you. You can define implementations to create new sources or replace existing new new.

A typical use of use is:

  • Make an implementation to get a replica institution and pods.
  • Check the status of an implementation to see if it succeeds or not.
  • Attend this implementation later to make the pods again (for example to use a new image).
  • Rollback to an earlier implementation -audit if the current implementation is not stable.
  • Breaking and resuming an implementation.

Make an implementation

Here is an example of implementation.

{ % inkluderer code.html sprog = "yaml" file = "nginx-deploying.yaml" ghlink = "/docs/koncepter/arbejdsbelastninger/controllere/nginx-indgivelse.yaml" %}

Perform the example by downloading the sample file and then carrying out this assignment:

$ Kubectl Create -F Docs/User guide/nginx-deplopment.yaml-recorded implementation "nginx-deplopment" Retettet

Set Kubectl -Flag--dossierUnpleasantrightThis allows you to register the current assignment in comments about the created or updated sources.

Rent andfewWill give immediately:

$ Kubectl

This indicates that the desired implementation number is copies 3 (according to the implementation.spec.replicas), the number of current copies (.status.replicas) is 0, the number of updated copies (.status.updatedReplicas) is 0, and the number of available copies (.Status.availablereplicas) Is also 0.

The drivingfewAgain, a few seconds later, should give:

$ Kubectl get implementation name Wanted Wanted Current Available AGGINX IMAPtion 3 3 3 18S

This indicates that the implementation has made all three replicas and all copies up -to -date are (contains the latest pod -template) and available (POD status is ready for the least implementation.spec.minreadySeconds).RaceKubectl gets RSInKubectl gets bellowsShows the replicas set (RS) and broken bellows.

$ Kubectl get rnname Wanted current clear AGEGINX-DEPEPPOPment-2035384211 3 3 0 18S

You may notice that the name of the replica set is always-.

$ Kubectlnginx, Pod-Template-Hash = 2035384211NGINX-DEPLOPMENT-2035384211-QQCNN 1/1 Driving 0 18s app = NGINX, POD-Template-Hash = 2035384211

The replica set created ensures that there are three Nginx bellows at all times.

Remark:You must specify the correct election and pod-template labels for an implementation (in this case,app = nginx), it is not about each other with other controllers (including implementations, replica sets, replication control, etc.) You do not prevent Kubernets from doing this, and if you have several controllers that overlapping voters will fight each other and you will not behave.

Update an implementation

Remark:An implementation -rollout is activated if and only if the installation pod template (ie..spec.template) Changes, such as updating labels or container images of the template.Other updates, such as scaling the implementation, do not cause a rollout.

Suppose we now want to update the Nginx ballows to useNginx: 1.9.1ImageInstead vanNginx: 1.7.9image.

$ Kubectl Set Image Implementment/NGINX-Implementatie NGINX = NGINX: 1.9.1DEBOYATION "NGINX-DEEPYATION" Picture Updated

As an alternative we can do thatadaptationImplementation and change.Spec.template.spec.containers [0] .ImagevanNginx: 1.7.9UnpleasantNginx: 1.9.1:

$ Kubectl

To just see his roll -out status run:

$ Kubectl Roll-Out Status Implementation/Nginx-Sepement Waiting to roll out in the end of the end: 2 of the 3 new replicas have been updated ... Implementation "Nginx-Dispen" successfully rolled out successfully

After the rollout has been successful, it can be a good ideafewThe implementation:

$ Kubectl

The number of updated replicas indicates that the implementation has updated the replicas for the latest configuration. The current replicas indicate the total replicas that this implementation manages, and the available replicas then indicate the counts of available copies.

We can runKubectl gets RSTo see that the implementation has updated the belts by making a new replica set and scaling up to 3 replicas, and scaling off the old replica set for 0 replicas.

$ Kubectl get rnname Wanted Current Clear Agenginx-deplopment-1564180365 3 3 0 6SNGINX-DEPECPPOPMENT-2035384211 0 0 0 0 36s

raceGet bellowsNow only has to show the new pods:

$ Kubectl Get Podsname Ready Status Retourneert Aginx-Deployment-Femment-1564180365-KHKU8 1/1 Running 0 14nginx-deplofumbumpeming-fugming-fumbe

The next time we want to update these pods, we only have to re -update the installation pod template.

Implementation can ensure that only a certain number of bellows can be fallen while you updated.

Distribution can also ensure that only a certain number of pods can be made above the desired number of pods.

For example, if you look carefully at the above implementation, you will see that it first made a new pod, then removed some old bellows and made it new.Do not make new pods before a sufficient number of old pods are killed.

$ Kubectl Describe implementation name: nginx -deplopmentaatmace: Standard CreationTimStamp: Tue, 15. March 2016 12:01:06 -0700 labels: App = Nginxselector: App = NginXreplicas: 3 updated |:Newreplica set: NGINX-BOOPLEFOUTS-13564180365 (3/3 Replicas Presided) Events: See first Lastsene Counting of SubObject-1164180365 (3/3 Replukas Create) Events: First Last Last Last on SubObject-the Taire Protection ----------------Replica Set Nginx-Dholling-AF- 1564180365 to 1 23s 1 {deplotment-up-up-up-up-Up-Up-the controller} Normal Scallicasy Ed Down Replica Set Nginx-Depement-20103538411 to 2 23s 1 {dePlement Urplement {dePlementSkilled skilled skilled skilled skilled skilled scaled scaled scales of Nginx-Depement-Fikement-1036418036503650365 to 2 21s 1 {Deepement Contribs 35384211 to 01s 21s 1} Set Controllin 5 to 3 to 3

Here we see that when we created the implementation for the first time, it made a replica set (nginx-deployment-2035384211) and scaled it directly to 3 copies. We have updated the implementation, created a new replicaset (Nginxdeplopling-1564180365) and scaled it up to 1 and then scaled the old replica on 2, so at least 2 bellows were available and a maximum of 4 pods were made at all times.Replica set with the same strategy for the roller update.

More updates

Every time a new implementation object is observed by the implementation controller, a replica set has been made to get the desired pods if there is no existing replicas set that does..Spec.selectorBut Whotemplate does not match.spec.templatewas scaled. Possibly the new replica chair scaled.spec.replicasAnd all old replica sets are scaled to 0.

If you update an implementation while an existing implementation is underway, the implementation makes a new replicas set according to the update and starts scaling it up and the replica list rolls with old replica sets and starts it.

Onderstand e.g.Nginx: 1.7.9, but then updates the implementation to make 5 copies ofNginx: 1.9.1, when only 3 replicas ofNginx: 1.7.9was made.In this case, the implementation will immediately start filling the 3Nginx: 1.7.9Balg who had created it and will start creatingNginx: 1.9.1Ballows.It will not wait for 5 copies ofNginx: 1.7.9must be made before you change course.

Rolls back an implementation

Sometimes you can roll an implementation;e.g.Auditation history Border).

Remark:An implementation revision is made when an implementation rollout is activated..spec.template) Changes, for example, update of labels or container images of the template. Other updates, such as scaling up, will not make implementation audit, so that we can facilitate the same time Orauto scale.

Suppose we have made a typo while we have updated the installation by placing the image name asNginx: 1,91instead ofNginx: 1.9.1:

$ Kubectl Set Image Implementation/Nginx-Deepoyatie Nginx = Nginx: 1.91deofobouse "NGINX-DEplopment" Photo Updated

The rolling is stuck.

$ Kubectl Roll-Out Status Implementation's Nginx DIEPOOTWAITING to roll out in the end of the end: 2 of the 3 new copies have been updated ...

Press CTRL-C to stop the above roller status watch.For more information about locked rollout,Read more here.

You will also see that both the number of old copies (Nginx-Depemment-1564180365 and Nginx-Depemment-2035384211) and new replicas (Nginx-Depolment-3066724191) are 2.

$ Kubectl

If you look at the pods made, you will see that the 2 pods made by the new replicas set are stuck in a Picture Tractor loop.

$ Kubectl Get podsname Ready Status GenStart Agenginx-DeplouMment-1564180365-70iae 1/1 Running 0 25Snginx-DeplouMment-1564180365-JBQQo 1/1 Running 0 25Snginx-DEBLEBLEMMELS Backoff 0 6s

Note that the implementation controller automatically stops the poor role and stops scaling up the new replicas set.

$ Kubectl Describe Implementation Name: Nginx -Deplopmentnament: Standard CreationTimStamp: Tir, 15. March 2016 14:48:04 -0700 labels: App = Nginxselector: App = Nginxreplicas: 2 updated |1 Max Surge Collections: NGINX-DEPYATION-1564180365 (2/2 replicas made) New reply: NGINX-PLIMENTS 3066724191 (2/2 Eplicter SubObjectPath Type Reason -------------------------------------------------------- 1m 1 {Implementation controller} Normal scale Replicase Set Set nginx-deploying-2035384211 to 3 22s 1 {implementmentController} Normal screen replicased REPLICA-SET NGINX DIP Department Deputie} Normal scale Replicaset scaled up replica -1564180365 Two 1 22S 22S 1 {Implementment-controller} The REPLICASED REPLICASED.-Concaller} plicaset scaled up replica-styles nginx installation-3066724191 to 1 13s 13s 1 {implementation-controller} normal scale replacement replica set ninx-deplying-154180365 to replica set up replica replica replica

To solve this, we must come back to an earlier revision of implementation that is stable.

Control of Roll -Out History about an implementation

First check the audits of this implementation:

$ Kubectl Rollout History Implementment/Nginx-DepolmentDeployments "Nginx-Deployation": Revision Change-Cause1 Kubectl Opret -f docs/User-Guide/NginX-DeploMMment.yaml-Record2 Kubect Set Image Implementment/Nginx-Depilment Nginx = Nginx: 1.9.13 kubectl Set Image Implementment/Nginx-DeploMMment Nginx = Nginx: 1,91

Because we have registered the assignment while we made this implementation using--dossier, We can easily see the changes that we have made in every audit.

Run to see the details of every overhaul:

$ Kubectl Rollout History Implementment/Nginx-Deployation-Revision = 2Defilms "Nginx-Dempling" Revision 2 Etiketter: App = Nginx Pod-Template-Hash = 1159050644 Annotationer: KuberNetes.io/Change-Cause-Cause-Cause- Cause- Cause- Cause-Cause- Cause- Cause- Cause- Cause- Cause- Cause- Cause- Cause- Cause- Cause- Cause- Empie-ImplementmentNginx = nginx: 1.9.1 ContaRe: nginx: billede: nginx: 1.9.1 poort: 80/tcp qos -niveau: cpu: bestfeffort geheugen: bestfeffort miljøvariabler:No volumes.

Rolls back to an earlier overhaul

Now we have decided to undo the current roll out and turn back to the previous overhaul:

$ Kubectl rollout canceling implementation/nginx-depolmentdeopyation "nginx-deepmement" rolled back

As an alternative you can turn back to a specific revision by entering it-To revision:

$ Kubectl roll-out-out cancellation/nginx implementation-to-revision = 2Depoyation "nginx-deepoyation" reversed

For more information about Roll -Out related assignments, readKubectl -rollout.

The implementation is now being reversed to an earlier steady overhaul.RollbackEvent to scroll back to Revision 2 is generated by implementation controls.

$ kubectl updated3 totalNewreplica set: NGINX-BOOPLEFOUTS-13564180365 (3/3 Replicas Presided) Events: See first Lastsene Counting of SubObject-1164180365 (3/3 Replukas Create) Events: First Last Last Last on SubObject-the Taire Protection ------------------------------Deplotment installation of ninxx-af-1264180365 to 1 29m 29m-obligation 1264180365 to 1 29m 29m 1 {depletment-Installation-Play-Play-Play-Play-Olto-Boulition-OF-156418180655 to 1 29m-controllerDown Down Down Down Replica Set Nginx-Deeps-201038421 Depplement-Conement {Depplement {Depplement-Conceme {Depplement-Conceme {Deply Reply-Concased Redplica Set Nginx depement scaleReplic-Replica SetNGINX-DEPLMING-2011 To-29m 1 {Depocement Contrstruction} Normal scale Reply-Replica SetNGINX-DEPLING-2011 0 29m 1 {Implementment-controller} Normal scales 3066724191 to 2 29m 1 {Implementation Control Control Control Control Control Control Control ContractSet replica Down Replica Down Replica Set Nginx -Defilmment -3066724191 Til 0 2m 1 {Implementation Neddelt} Normalmontering} Normal} Mormal} Mormal} Mormal} Mormal} Mormal} Mormal} Mormal} Mormal} Mormal} Mormal} momant} Mormal} Mormal} Mormal} M Normaler} Normal Mondprøyment Rollback Returned Implementation "Nginx Definition" To Revision 2 29m 2 2 {Implementation controller} Normal Scales Redplica's Set Replica Set Nginx Depection 156418065 to 3

Clean up the policy

You can set.Spec.RevisionHistoryLimitField to indicate how much audit history with this implementation you want to keep.0An implementation rejected that is reversed.

An implementation scales

You can scales an implementation with the following assignment:

$ KubectL Scale implementation Nginx implementation replicas 10-DeteReation "Nginx installation" scaled

MitsHorizontale pod autoscalingis enabled in your cluster, you can configure a car scaler for your implementation and the minimum selection and the maximum number of pods that you want to perform based on the CPU use of your existing pods.

$ Kubectl car scale implementation nginx-implementation-min = 10-max = 15-cpu-perent = 80th ploumment "nginx-deploumment" autoscaled

Rolling update implementations at the same time support multiple versions of an application of an application.Reply sets with pods) to reduce the risk.This is calledProportional scaling.

For example, you implement an implementation with 10 copies,Maxsurge= 3, inMaxunavailable= 2.

$ Kubectl

You update to a new image that happens to be insoluble from the cluster.

$ Kubectl Set Image Implementing/Nginx floor Nginx = Nginx: sometimes "Nginx-Deepoyation" photo updated

The image update starts a new rollout with Replicased Nginx Definition-1989198191, but this is blocked for what requirements are needed, as we have mentioned above.

$ Kubectl

Then comes a new scale request for implementation with.Scales must spread the extra replicas over all replica sets.

In our example above, 3 replicas are added to the old replicas and 2 replicas are added to the replicas.

$ Kubectl gets implementation name Wanted Wanted Currently updated Aginx Implementation 15 18 7 8 7m $ Kubectl Get RSNAM

Pauses and resumes an implementation

You can also pause an implementation halfway and then resume it.

Relocate the implementation and then put the insertion on breaks withKubectl -Expansion break:

$ Kubectl set image Implementation/nginx deplommment nginx = nginx: 1.9.1;Kubectl Rollout Pause Implementation/Nginx-Depolmented Implementation "NGINX Implementation" Billede Door Dateret Deploumment "NGINX-DEploumment" Pauset "Pause" Pauset "

Note that every current status of implementation will continue its function, but new updates for the implementation will have no effect as long as the implementation is paused.

The implementation was still underway when we paused it, so the actions of scaling up up and down replica sets are also paused.

$ Kubectl get to be renamed Ready Age Nginx Development-1564180365 2 2 2 1hnginx-deplopment-205384211 2 2 0 1hnginx-deplomming -3066724191 0 0 1h 1h 1h 1h

Keep an eye on the roll -out status change in a separate terminal and you will see that the rollout will not take place:

$ Kubectl Expiration Status Implementation/Nginx Depolmentwaiting to roll out in the end of the end: 2 of the 3 new replicas have been updated ...

To resume the implementation, you just do itKubectl -Prol CV:

$ Kubectl roll-out CV Implementation/Nginx Implementation Implementation "NGINX-DEEPOYATION" respected

Then the implementation continues and the rollout ends:

$ Kubectl roll-out status implementation/nginx floor swinging to roll out in the end of the end: 2 of the 3 new replicas have been updated ... Waiting for the implementation specification to be observed ... Waiting for rollout ends: 2 of the 3 newAnswers have been updated ... implementation Nginx implementation successfully rolled out
$ KiBectl Get Rename Wanted Kereed Age Nginx-Deploying-1564180365 3 3 3 1HNginx-Deplopment-205384211 0 0 0 0 1HNGinx-Deplouming-3066724191 0 0 0 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H 1H

NOTE: You cannot roll paused inserts before resuming it.

Implementeringsstatus

An implementation goes in different states during his life cycle.It could beprogressAlthough it rolls out a new replicas, it can be thatcompletely, whether it is possibleNot continue.

Progress implementation

Kubernetes marks an implementation asprogressWhen one of the following tasks is performed:

  • The implementation is busy making new replicas.
  • The implementation scales up an existing replicas.
  • The implementation rearranges an existing replicas.
  • New pods are becoming available.

You can follow the progress of an implementation with the help ofKubectl -Prol -status.

Full implementation

Kubernetes marks an implementation ascompletelyWhen it has the following features:

  • The implementation has minimal accessibility.Minimum munmage means that the number of available implementation replicasequals or the number required by the implementation strategy exceeds.
  • All replicas linked to the implementation have been updated to the latest version you have specified, which means that all requested recorders are completed.
  • No old bellows until the implementation runs.

You can check whether an implementation is completed by usingKubectl -Prol -status.If roll -out successfully completed,Kubectl -Prol -statusReturns a zero output code.

$ Kubectl -Explanation/nginx waiting for rollouts to do: 2 of 3 updated replicas are available ... Implementation "nginx" successfully $ echo $ rolled out? 0

Failed implementation

Your implementation can be stuck by trying to implement the latest replicas without ever ending.

  • Insufficient quota
  • Emergency probe errors
  • Image drawing error
  • Insufficient permits
  • Limitation intervals
  • Application of runtime misconfiguration

A way in which you can register this condition can be specified by a Deadline parameter in your implementation specification: ((((Spec.).Spec.Indicates the number of seconds in which the implementation controller waits before (via implementation status) indicated that the progress of the implementation has stopped.

The followingKubectlCommand places specification withProgress Deadline secondsTo have the controller report reported, lack of progress for an implementation after 10 minutes:

$ kubectl patch-implementering/nginx-implementering -p '{"spec": {"progressDeadlineseconds": 600}}' 'nginx-deploying' gepatcht

Once the deadline has been exceeded, the implementation controller adds an implementation condition with the following characteristics for implementationStatus.conditions:

  • Type = progress
  • Status = false
  • Cause = progressdeadlineex then

MetKubernetes API ConventionsFor more information about status conditions.

Note that in version 1.5 Kubernetes does not take action on a different stop installation than to report a status mode withCause = progressdeadlineex then.

Remark:If you pause an implementation, Kubernetes does not manage the progress in the direction of your specified deadline.

With your implementations you can experience short -term errors, either because of a low time -out that you have set or because of another Cheekof error that can be treated as a short -life.If you describe the implementation, you will notice the following section:

$ KubectL describe the implementation of NGINX implementation <...> Conditions: Type status cause ---------------- available True Minimum Replicasavaillable Progress True ReplicasetUPED ReplicaFailure True FailCreate <...>

If you runKubectl get implementation nginx -the implementation -o yaml, Implementation status can look like this:

Status: Aventablicas: 2 Conditions: -Sasted TransitionTime: 2016-10-04t12: 25: 39z Lastupdatetime: 2016-10-04t12: 25: 39z Message: replica set "nginx-deplopment-4262182780" True "Type:-10-04t12: 25: 42z Lastupdatime: 2016-10-04t12: 25: 42z Message: Implementation has minimal accessibility: 39z Lastupdatetime: 2016-10-04t12: 25: 39z Message: 'Error creation: pods "nginx-Dieboyter-4262182780- "ICE Bond: Opown Quota: Object Counts, Wanted: Pods = 1, Used: Pods = 3, Limited: Pods = 2 'Cause: Failed Create status:" True "Type: Replyailure Observer De-Generation: 3Replicates: 2 Unadail Bab Repricas: 2

Finally, when the deadline for insert progress has been exceeded, the status of cubes contributes to the status of the cubes and the reason for the progressive state:

Conditions: Type status Reason ------------- available True Minimum Replicasavaillable Progress False ProgressDeadLinLinExCesceded ReplicaFailure True Failed Create

You can solve a matter of insufficient quota by scaling up your implementation by scaling up other controllers that you may drive, or by raising the quota in your name area.Will see the update of the implementation status with a successful condition (Status = whereInReason = new replicas available).

Conditions: Type status reason -------------- available True Minimum Replicas Available Progress with Real New Replicasetavaillable

Type = availablemetStatus = wheremeans that your implementation has minimal accessibility.Minimum availability is determined by the parameters that are specified in the implementation strategy.Type = progressmetStatus = wheremeans that your implementation in the middle of a rollout and is progressing or that it has implemented its progress and the minimal recovered new copies are available (see the reason for the condition of the information - in our caseReason = new replicas availablemeans that the implementation is complete).

You can check whether an implementation has not continued by usingKubectl -Prol -status.Kubectl -Prol -statusReturns a non-NOL exit code if the implementation has exceeded the Progressiedeadline.

$ Kubectl roll -out status implement/nginxwaiting for rollout top: 2 of the 3 new replicas have been updated ... error: Implementation "nginx" surpassed the progress theadline $ echo $ 1? 1

Working on a failed implementation

All actions that apply to a complete implementation also apply to a failed implementation.You can scale/down, turn back to an earlier overhaul or even pause if you have to apply multiple adjustments to the implementation of the poden template.

Use cases

Canary implementation

If you want to roll releases to a subgroup of users or servers that use the implementation, you can make multiple implementations, one for each release, according to the Canary pattern described inHandling resources.

Write an installation specification

Just as with all other Kubernetes configurities, an implementation needsApiversion,,friendlyInMetafields.For general information about working with configuration filesImplementation of applications,,Configuration of containersInUse Kubectl to manage sourcesDocuments.

An implementation also needs one.specsection.

Podsjabloon

Of.spec.templateIs the only required field in.spec.

Of.spec.templateis aPodsjabloon. It has exactly the same schedule as onePeulexcept that it is embedded and has noneApiversionoffriendly.

In addition to the required fields for a POD, a pod template in an implementation must specify loans (ie does not overlap with other controllers, seeto elect) and a suitable restart policy.

But one.spec.template.spec.RestartPolicyin accordance withAlwaysIs allowed, what is standard if it is not specified.

Replica

.spec.replicasis an optional field that specifies the number of desired bellows.The standard STO 1.

To elect

.Spec.selectoris an optional field that oneLabelto the podarget of this implementation.

If indicated,.Spec.selectormust agree.spec.template.metadata.labels, or it will be rejected by API.IF.Spec.selectoris not specified,.Spec.selector.matchlabelsis given notice of default.spec.template.metadata.labels.

Implementation can kill pods when labels match the voter, in case their template is different than.spec.templateOr if the total number of such podsexeds.spec.replicas. It will bring new pods forward.spec.templateIf the number of pods is smaller than the desired number.

Note that you should not make any other pods if labels match this voter, nor directly, via a different implementation, nor through another controller, such as replica set or replication management.this.

If you have several controllers who have overlapping voters, the controllers will fight each other and do not behave well.

Strategy

. Spec. strategyEnter the strategy that is used to replace old bellows with new ones..Spec.strategy.typeCan "recreate" or "rolling update"."Rolling update" is the default value.

Restore the implementation

All existing bellows are killed before new ones are made when.Spec.strategy.type == Gendan.

Rolling update installation

The implementation contributes to the pods in oneRolling updateMode, when.Spec.strategy.type == RollingUpdate.U can give upMaxunavailableInMaxsurgeTo check the rolling update process.

Max not available

.spec.strategy.rollingupdate.maxunavailableis an optional field that specifies them a number of bellows that can be inaccessible during the update process. The value can be an absolute number (eg 5) or a percentage of the desired pods (eg 10%). The absolute number is calculated onbased on the percentage of the percentage of the training. This may not be 0 if.Spec.strategy.rollingupdate.maxsurgeis 0. A fixed value of 1 is used as standard.

For example, if this value is set to 30%, the old replica set can be reduced to 70% of the desired pods immediately when the roll update starts.Scaling up the new replica set, which ensures that the total number of available pods is at all times during the drawing at least 70% of the desired pods.

Maximum wave

.Spec.strategy.rollingupdate.maxsurgeis an optional field that specifies those whoMaxunavailableis 0. The absolute number is calculated on the basis of the completion rate. Standard a value of 1 is used.

For example, if this value is set to 30%, the new replica set can be scaled up immediately when the rolling update starts, so that the total number of old and new pods is not greater than130% of the desired pods.The new replica set can be killed can be further scaled up, so that the total number of pods that will be performed at any time during the update is a maximum of 130% of the desired Pods.

The progress of progress seconds

.Spec.progressdeadlinesekunderis an optional field that indicates the number of seconds that you wait until your implementation continues before the system again reports that the implementation hasFailed progress- appeared as a condition withType = progress,,Status = false.InCause = progressdeadlineex thenIn the status of the source.The implementation controller will throw the implementation.In the future, when automatic reversing is implemented, the implementation controller will roll back an installation as soon as it perceives such a condition.

If indicated, this field must be larger than.spec.minreadySeconds.

My clear seconds

.spec.minreadySecondsis an optional field (with default value of the 600S) that the essential number of seconds indicates that a newly created POD must be ready without one of his containers going down to make it available. This is standard for 0 (POD is considered asavailable as soon as it is ready). See to find out more when a pod is considered readyContainerprober.

Turn back to

.spec.rollbacktois an optional field with the configuration to which implementation is declining.Setting of this field activates a rollback and this field is deleted every time a rollback is performed.

Revision

.Spec.rollback Til.Revisionis an optional field that indicates the revision.This is standard for 0, which means reversing for the last revision of the story.

Auditation history Border

An implementation -audit story is stored in replica settings that it controls.

.Spec.RevisionHistoryLimitis an optional field (with standard value of two) that indicates the number of old replica sets to return to return.The ideal value depends on the frequency and stability of new implementations.inenz.and the congestion of output fromKubectl gets RS, if this field is not set.

More specifically, this means that this field is zero that all old replica sets with 0 replica are cleared. In this case, a new implementation role cannot be undone because the audit history is cleared.

Paused

.Spec.pAsedis an optional forestian field for a break and resuming an implementation.The standard according to False (an implementation is not a break).

Alternative to implementations

Kubectl -rolling -update

Kubectl -rolling -updateBellows updates and replication checks in a similar way. But the implementations are recommended as they explain, the server side and have extra functions, such as reversing an earlier revision, even after the rolling update is completed.

Implementation - unofficial Kubernetes (2024)
Top Articles
Latest Posts
Article information

Author: Roderick King

Last Updated:

Views: 5670

Rating: 4 / 5 (71 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Roderick King

Birthday: 1997-10-09

Address: 3782 Madge Knoll, East Dudley, MA 63913

Phone: +2521695290067

Job: Customer Sales Coordinator

Hobby: Gunsmithing, Embroidery, Parkour, Kitesurfing, Rock climbing, Sand art, Beekeeping

Introduction: My name is Roderick King, I am a cute, splendid, excited, perfect, gentle, funny, vivacious person who loves writing and wants to share my knowledge and understanding with you.