Changes for move to Netlify (#4464)
* disable jekyll-redirect-from gem * add _redirects file * disable 404 redirect script * add 301 redirect to test * retain _redirects file * Convert redirect_from's to _redirect file. (#4409) * Remove redirect_from's. (#4424) * Add 301's to _redirects. (#4427) * add whitespace before 301 * move redirects in /js/redirects/js to _redirects * add disabled option for cn redirect * convert include to array in _config.yml * enable redirects.js script for legacy support
This commit is contained in:
@@ -6,9 +6,6 @@ assignees:
|
||||
- janetkuo
|
||||
- smarterclayton
|
||||
title: Delete a Stateful Set
|
||||
redirect_from:
|
||||
- "/docs/tasks/manage-stateful-set/deleting-a-statefulset/"
|
||||
- "/docs/tasks/manage-stateful-set/deleting-a-statefulset.html"
|
||||
---
|
||||
|
||||
{% capture overview %}
|
||||
@@ -30,7 +27,7 @@ This task shows you how to delete a StatefulSet.
|
||||
You can delete a StatefulSet in the same way you delete other resources in Kubernetes: use the `kubectl delete` command, and specify the StatefulSet either by file or by name.
|
||||
|
||||
```shell
|
||||
kubectl delete -f <file.yaml>
|
||||
kubectl delete -f <file.yaml>
|
||||
```
|
||||
|
||||
```shell
|
||||
|
||||
@@ -5,9 +5,6 @@ assignees:
|
||||
- justinsb
|
||||
- directxman12
|
||||
title: Horizontal Pod Autoscaling Walkthrough
|
||||
redirect_from:
|
||||
- "/docs/user-guide/horizontal-pod-autoscaling/walkthrough/"
|
||||
- "/docs/user-guide/horizontal-pod-autoscaling/walkthrough.html"
|
||||
---
|
||||
|
||||
Horizontal Pod Autoscaling automatically scales the number of pods
|
||||
|
||||
@@ -4,9 +4,6 @@ assignees:
|
||||
- jszczepkowski
|
||||
- directxman12
|
||||
title: Horizontal Pod Autoscaling
|
||||
redirect_from:
|
||||
- "/docs/user-guide/horizontal-pod-autoscaling/"
|
||||
- "/docs/user-guide/horizontal-pod-autoscaling/index.html"
|
||||
---
|
||||
|
||||
This document describes the current state of Horizontal Pod Autoscaling in Kubernetes.
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
assignees:
|
||||
- janetkuo
|
||||
title: Perform Rolling Update Using a Replication Controller
|
||||
redirect_from:
|
||||
- "/docs/user-guide/rolling-updates/"
|
||||
- "/docs/user-guide/rolling-updates.html"
|
||||
- "/docs/user-guide/update-demo/index/"
|
||||
- "/docs/user-guide/update-demo/index.html"
|
||||
---
|
||||
|
||||
* TOC
|
||||
|
||||
@@ -8,9 +8,6 @@ assignees:
|
||||
- kow3ns
|
||||
- smarterclayton
|
||||
title: Run a Replicated Stateful Application
|
||||
redirect_from:
|
||||
- "/docs/tutorials/stateful-application/run-replicated-stateful-application/"
|
||||
- "/docs/tutorials/stateful-application/run-replicated-stateful-application.html"
|
||||
---
|
||||
|
||||
{% capture overview %}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
---
|
||||
title: Run a Single-Instance Stateful Application
|
||||
redirect_from:
|
||||
- "/docs/tutorials/stateful-application/run-stateful-application/"
|
||||
- "/docs/tutorials/stateful-application/run-stateful-application.html"
|
||||
---
|
||||
|
||||
{% capture overview %}
|
||||
@@ -115,7 +112,7 @@ for a secure solution.
|
||||
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
mysql-63082529-2z3ki 1/1 Running 0 3m
|
||||
|
||||
|
||||
1. Inspect the Persistent Volume:
|
||||
|
||||
kubectl describe pv mysql-pv
|
||||
@@ -127,7 +124,7 @@ for a secure solution.
|
||||
Reclaim Policy: Retain
|
||||
Access Modes: RWO
|
||||
Capacity: 20Gi
|
||||
Message:
|
||||
Message:
|
||||
Source:
|
||||
Type: GCEPersistentDisk (a Persistent Disk resource in Google Compute Engine)
|
||||
PDName: mysql-disk
|
||||
@@ -171,7 +168,7 @@ know your stateful MySQL database is up and running.
|
||||
Waiting for pod default/mysql-client-274442439-zyp6i to be running, status is Pending, pod ready: false
|
||||
If you don't see a command prompt, try pressing enter.
|
||||
|
||||
mysql>
|
||||
mysql>
|
||||
```
|
||||
|
||||
## Updating
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
---
|
||||
title: Run a Stateless Application Using a Deployment
|
||||
redirect_from:
|
||||
- "/docs/user-guide/simple-nginx/"
|
||||
- "/docs/user-guide/simple-nginx.html"
|
||||
- "/docs/user-guide/pods/single-container/"
|
||||
- "/docs/user-guide/pods/single-container.html"
|
||||
- "/docs/user-guide/deploying-applications/"
|
||||
- "/docs/user-guide/deploying-applications.html"
|
||||
- "/docs/tutorials/stateless-application/run-stateless-application-deployment/"
|
||||
- "/docs/tutorials/stateless-application/run-stateless-application-deployment.html"
|
||||
- "/docs/tutorials/stateless-application/run-stateless-ap-replication-controller/"
|
||||
- "/docs/tutorials/stateless-application/run-stateless-ap-replication-controller.html"
|
||||
---
|
||||
|
||||
{% capture overview %}
|
||||
|
||||
@@ -8,9 +8,6 @@ assignees:
|
||||
- kow3ns
|
||||
- smarterclayton
|
||||
title: Scale a StatefulSet
|
||||
redirect_from:
|
||||
- "/docs/tasks/manage-stateful-set/scale-stateful-set/"
|
||||
- "/docs/tasks/manage-stateful-set/scale-stateful-set.html"
|
||||
---
|
||||
|
||||
{% capture overview %}
|
||||
@@ -19,8 +16,8 @@ This page shows how to scale a StatefulSet.
|
||||
|
||||
{% capture prerequisites %}
|
||||
|
||||
* StatefulSets are only available in Kubernetes version 1.5 or later.
|
||||
* **Not all stateful applications scale nicely.** You need to understand your StatefulSets well before continuing. If you're unsure, remember that it might not be safe to scale your StatefulSets.
|
||||
* StatefulSets are only available in Kubernetes version 1.5 or later.
|
||||
* **Not all stateful applications scale nicely.** You need to understand your StatefulSets well before continuing. If you're unsure, remember that it might not be safe to scale your StatefulSets.
|
||||
* You should perform scaling only when you're sure that your stateful application
|
||||
cluster is completely healthy.
|
||||
|
||||
@@ -36,7 +33,7 @@ for which kubectl you're using.
|
||||
|
||||
### `kubectl scale`
|
||||
|
||||
First, find the StatefulSet you want to scale. Remember, you need to first understand if you can scale it or not.
|
||||
First, find the StatefulSet you want to scale. Remember, you need to first understand if you can scale it or not.
|
||||
|
||||
```shell
|
||||
kubectl get statefulsets <stateful-set-name>
|
||||
@@ -50,24 +47,24 @@ kubectl scale statefulsets <stateful-set-name> --replicas=<new-replicas>
|
||||
|
||||
### Alternative: `kubectl apply` / `kubectl edit` / `kubectl patch`
|
||||
|
||||
Alternatively, you can do [in-place updates](/docs/concepts/cluster-administration/manage-deployment/#in-place-updates-of-resources) on your StatefulSets.
|
||||
Alternatively, you can do [in-place updates](/docs/concepts/cluster-administration/manage-deployment/#in-place-updates-of-resources) on your StatefulSets.
|
||||
|
||||
If your StatefulSet was initially created with `kubectl apply` or `kubectl create --save-config`,
|
||||
If your StatefulSet was initially created with `kubectl apply` or `kubectl create --save-config`,
|
||||
update `.spec.replicas` of the StatefulSet manifests, and then do a `kubectl apply`:
|
||||
|
||||
```shell
|
||||
```shell
|
||||
kubectl apply -f <stateful-set-file-updated>
|
||||
```
|
||||
|
||||
Otherwise, edit that field with `kubectl edit`:
|
||||
|
||||
```shell
|
||||
```shell
|
||||
kubectl edit statefulsets <stateful-set-name>
|
||||
```
|
||||
|
||||
Or use `kubectl patch`:
|
||||
|
||||
```shell
|
||||
```shell
|
||||
kubectl patch statefulsets <stateful-set-name> -p '{"spec":{"replicas":<new-replicas>}}'
|
||||
```
|
||||
|
||||
@@ -76,9 +73,9 @@ kubectl patch statefulsets <stateful-set-name> -p '{"spec":{"replicas":<new-repl
|
||||
### Scaling down doesn't not work right
|
||||
|
||||
You cannot scale down a StatefulSet when any of the stateful Pods it manages is unhealthy. Scaling down only takes place
|
||||
after those stateful Pods become running and ready.
|
||||
after those stateful Pods become running and ready.
|
||||
|
||||
With a StatefulSet of size > 1, if there is an unhealthy Pod, there is no way
|
||||
With a StatefulSet of size > 1, if there is an unhealthy Pod, there is no way
|
||||
for Kubernetes to know (yet) if it is due to a permanent fault or a transient
|
||||
one (upgrade/maintenance/node reboot). If the Pod is unhealthy due to a permanent fault, scaling
|
||||
without correcting the fault may lead to a state where the StatefulSet membership
|
||||
@@ -90,7 +87,7 @@ the transient error may interfere with your scale-up/scale-down operation. Some
|
||||
databases have issues when nodes join and leave at the same time. It is better
|
||||
to reason about scaling operations at the application level in these cases, and
|
||||
perform scaling only when you're sure that your stateful application cluster is
|
||||
completely healthy.
|
||||
completely healthy.
|
||||
|
||||
|
||||
{% endcapture %}
|
||||
|
||||
@@ -8,9 +8,6 @@ assignees:
|
||||
- kow3ns
|
||||
- smarterclayton
|
||||
title: Upgrade from PetSets to StatefulSets
|
||||
redirect_from:
|
||||
- "/docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set/"
|
||||
- "/docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set.html"
|
||||
---
|
||||
|
||||
{% capture overview %}
|
||||
@@ -20,7 +17,7 @@ This page shows how to upgrade from PetSets (Kubernetes version 1.3 or 1.4) to *
|
||||
{% capture prerequisites %}
|
||||
|
||||
* If you don't have PetSets in your current cluster, or you don't plan to upgrade
|
||||
your master to Kubernetes 1.5 or later, you can skip this task.
|
||||
your master to Kubernetes 1.5 or later, you can skip this task.
|
||||
|
||||
{% endcapture %}
|
||||
|
||||
@@ -28,12 +25,12 @@ This page shows how to upgrade from PetSets (Kubernetes version 1.3 or 1.4) to *
|
||||
|
||||
## Differences between alpha PetSets and beta StatefulSets
|
||||
|
||||
PetSet was introduced as an alpha resource in Kubernetes release 1.3, and was renamed to StatefulSet as a beta resource in 1.5.
|
||||
PetSet was introduced as an alpha resource in Kubernetes release 1.3, and was renamed to StatefulSet as a beta resource in 1.5.
|
||||
Here are some notable changes:
|
||||
|
||||
* **StatefulSet is the new PetSet**: PetSet is no longer available in Kubernetes release 1.5 or later. It becomes beta StatefulSet. To understand why the name was changed, see this [discussion thread](https://github.com/kubernetes/kubernetes/issues/27430).
|
||||
* **StatefulSet guards against split brain**: StatefulSets guarantee at most one Pod for a given ordinal index can be running anywhere in a cluster, to guard against split brain scenarios with distributed applications. *TODO: Link to doc about fencing.*
|
||||
* **Flipped debug annotation behavior**: The default value of the debug annotation (`pod.alpha.kubernetes.io/initialized`) is now `true`. The absence of this annotation will pause PetSet operations, but will NOT pause StatefulSet operations. In most cases, you no longer need this annotation in your StatefulSet manifests.
|
||||
* **Flipped debug annotation behavior**: The default value of the debug annotation (`pod.alpha.kubernetes.io/initialized`) is now `true`. The absence of this annotation will pause PetSet operations, but will NOT pause StatefulSet operations. In most cases, you no longer need this annotation in your StatefulSet manifests.
|
||||
|
||||
|
||||
## Upgrading from PetSets to StatefulSets
|
||||
@@ -42,7 +39,7 @@ Note that these steps need to be done in the specified order. You **should
|
||||
NOT upgrade your Kubernetes master, nodes, or `kubectl` to Kubernetes version
|
||||
1.5 or later**, until told to do so.
|
||||
|
||||
### Find all PetSets and their manifests
|
||||
### Find all PetSets and their manifests
|
||||
|
||||
First, find all existing PetSets in your cluster:
|
||||
|
||||
@@ -53,42 +50,42 @@ kubectl get petsets --all-namespaces
|
||||
If you don't find any existing PetSets, you can safely upgrade your cluster to
|
||||
Kubernetes version 1.5 or later.
|
||||
|
||||
If you find existing PetSets and you have all their manifests at hand, you can continue to the next step to prepare StatefulSet manifests.
|
||||
If you find existing PetSets and you have all their manifests at hand, you can continue to the next step to prepare StatefulSet manifests.
|
||||
|
||||
Otherwise, you need to save their manifests so that you can recreate them as StatefulSets later.
|
||||
Here's an example command for you to save all existing PetSets as one file.
|
||||
Otherwise, you need to save their manifests so that you can recreate them as StatefulSets later.
|
||||
Here's an example command for you to save all existing PetSets as one file.
|
||||
|
||||
```shell
|
||||
# Save all existing PetSets in all namespaces into a single file. Only needed when you don't have their manifests at hand.
|
||||
# Save all existing PetSets in all namespaces into a single file. Only needed when you don't have their manifests at hand.
|
||||
kubectl get petsets --all-namespaces -o yaml > all-petsets.yaml
|
||||
```
|
||||
|
||||
### Prepare StatefulSet manifests
|
||||
### Prepare StatefulSet manifests
|
||||
|
||||
Now, for every PetSet manifest you have, prepare a corresponding StatefulSet manifest:
|
||||
Now, for every PetSet manifest you have, prepare a corresponding StatefulSet manifest:
|
||||
|
||||
1. Change `apiVersion` from `apps/v1alpha1` to `apps/v1beta1`.
|
||||
2. Change `kind` from `PetSet` to `StatefulSet`.
|
||||
3. If you have the debug hook annotation `pod.alpha.kubernetes.io/initialized` set to `true`, you can remove it because it's redundant. If you don't have this annotation, you should add one, with the value set to `false`, to pause StatefulSets operations.
|
||||
|
||||
It's recommended that you keep both PetSet manifests and StatefulSet manifests, so that you can safely roll back and recreate your PetSets,
|
||||
if you decide not to upgrade your cluster.
|
||||
It's recommended that you keep both PetSet manifests and StatefulSet manifests, so that you can safely roll back and recreate your PetSets,
|
||||
if you decide not to upgrade your cluster.
|
||||
|
||||
### Delete all PetSets without cascading
|
||||
|
||||
If you find existing PetSets in your cluster in the previous step, you need to delete all PetSets *without cascading*. You can do this from `kubectl` with `--cascade=false`.
|
||||
Note that if the flag isn't set, **cascading deletion will be performed by default**, and all Pods managed by your PetSets will be gone.
|
||||
If you find existing PetSets in your cluster in the previous step, you need to delete all PetSets *without cascading*. You can do this from `kubectl` with `--cascade=false`.
|
||||
Note that if the flag isn't set, **cascading deletion will be performed by default**, and all Pods managed by your PetSets will be gone.
|
||||
|
||||
Delete those PetSets by specifying file names. This only works when
|
||||
the files contain only PetSets, but not other resources such as Services:
|
||||
|
||||
```shell
|
||||
# Delete all existing PetSets without cascading
|
||||
# Delete all existing PetSets without cascading
|
||||
# Note that <pet-set-file> should only contain PetSets that you want to delete, but not any other resources
|
||||
kubectl delete -f <pet-set-file> --cascade=false
|
||||
```
|
||||
|
||||
Alternatively, delete them by specifying resource names:
|
||||
Alternatively, delete them by specifying resource names:
|
||||
|
||||
```shell
|
||||
# Alternatively, delete them by name and namespace without cascading
|
||||
@@ -98,23 +95,23 @@ kubectl delete petsets <pet-set-name> -n=<pet-set-namespace> --cascade=false
|
||||
Make sure you've deleted all PetSets in the system:
|
||||
|
||||
```shell
|
||||
# Get all PetSets again to make sure you deleted them all
|
||||
# Get all PetSets again to make sure you deleted them all
|
||||
# This should return nothing
|
||||
kubectl get petsets --all-namespaces
|
||||
```
|
||||
|
||||
At this moment, you've deleted all PetSets in your cluster, but not their Pods, Persistent Volumes, or Persistent Volume Claims.
|
||||
At this moment, you've deleted all PetSets in your cluster, but not their Pods, Persistent Volumes, or Persistent Volume Claims.
|
||||
However, since the Pods are not managed by PetSets anymore, they will be vulnerable to node failures until you finish the master upgrade and recreate StatefulSets.
|
||||
|
||||
### Upgrade your master to Kubernetes version 1.5 or later
|
||||
|
||||
Now, you can [upgrade your Kubernetes master](/docs/admin/cluster-management/#upgrading-a-cluster) to Kubernetes version 1.5 or later.
|
||||
Note that **you should NOT upgrade Nodes at this time**, because the Pods
|
||||
(that were once managed by PetSets) are now vulnerable to node failures.
|
||||
(that were once managed by PetSets) are now vulnerable to node failures.
|
||||
|
||||
### Upgrade kubectl to Kubernetes version 1.5 or later
|
||||
|
||||
Upgrade `kubectl` to Kubernetes version 1.5 or later, following [the steps for installing and setting up
|
||||
Upgrade `kubectl` to Kubernetes version 1.5 or later, following [the steps for installing and setting up
|
||||
kubectl](/docs/tasks/kubectl/install/).
|
||||
|
||||
### Create StatefulSets
|
||||
|
||||
Reference in New Issue
Block a user