1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 15:46:57 +01:00

bug 1682997 machine fixes

This commit is contained in:
Kathryn Alexander
2019-02-26 15:45:26 -05:00
parent e5d9baa309
commit 7cece9a4fe
5 changed files with 22 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
[id='deploying-machine-health-checks']
= Deploying machine heath checks
= Deploying machine health checks
include::modules/common-attributes.adoc[]
:context: deploying-machine-health-checks
toc::[]

View File

@@ -14,15 +14,12 @@ The Machine API is a combination of primary resources that are based on the upst
link:https://github.com/kubernetes-sigs/cluster-api[Cluster API] project and
custom {product-title} resources.
The three primary resources are:
The two primary resources are:
`Machines`:: A fundamental unit that describes a `Node`. A `machine` has a
class, which describes the types of compute nodes that are offered for different
cloud platforms. For example, a `machine` type for a worker node on Amazon Web
Services (AWS) might define a specific machine type and required metadata.
`MachineClasses`:: A unit that defines a class of `machines` and facilitates
configuration reuse across `machines` of the same class. This unit functions
like a `StorageClass` for PersistentVolumeClaims.
`MachineSets`:: Groups of machines. `MachineSets` are to `machines` as
`ReplicaSets` are to `Pods`. If you need more `machines` or need to scale them down,
you change the *replicas* field on the `MachineSet` to meet your compute need.
@@ -36,12 +33,13 @@ specified `MachineSet`, and the `MachineAutoscaler` maintains that range of node
The `MachineAutoscaler` object takes effect after a `ClusterAutoscaler` object
exists. Both `ClusterAutoscaler` and `MachineAutoscaler` resources are made
available by the `ClusterAutoscalerOperator`.
`MachineHealthChecker`:: This resource detects when a machine is unhealthy,
`MachineHealthCheck`:: This resource detects when a machine is unhealthy,
deletes it, and, on supported platforms, makes a new machine.
`ClusterAutoscaler`:: This resource is based on the upstream
link:https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler[ClusterAutoscaler]
project. In the {product-title} implementation, it is integrated with the
Cluster API by extending the `MachineSet` API.
////
`ClusterAutoscalerOperator`:: Instead of interacting with the `ClusterAutoscaler`
itself, you use its Operator. The `ClusterAutoscalerOperator` manages
the `ClusterAutoscaler` deployment. With this Operator, you can set cluster-wide
@@ -49,6 +47,7 @@ scaling limits for resources such as cores, nodes, memory, and GPU.
and so on. You can set the priority so that the cluster prioritizes pods so that
new nodes are not brought online for less important pods. You can also set the
ScalingPolicy so you can scale up nodes but not scale them down.
////
In {product-title} version 3.11, you could not roll out a multi-zone architecture easily because the cluster

View File

@@ -5,7 +5,7 @@
[id='machine-health-checks-about-{context}']
= About MachineHealthChecks
MachineHealthChecks automatically repair unhealthy Machines in a particular
MachineHealthChecks automatically repairs unhealthy Machines in a particular
MachinePool.
To monitor machine health, you create a resource to define the

View File

@@ -14,25 +14,22 @@ apiVersion: healthchecking.openshift.io/v1alpha1
kind: MachineHealthCheck
metadata:
name: example <1>
namespace: example <2>
namespace: openshift-machine-api
Spec:
Selector:
matchLabels:
sigs.k8s.io/cluster-api-cluster: <cluster_name> <3>
sigs.k8s.io/cluster-api-machine-role: <label> <4>
sigs.k8s.io/cluster-api-machine-type: <label> <4>
sigs.k8s.io/cluster-api-machineset: <cluster_name>-<label>-<AWS-zone> <5>
sigs.k8s.io/cluster-api-cluster: <cluster_name> <2>
sigs.k8s.io/cluster-api-machine-role: <label> <3>
sigs.k8s.io/cluster-api-machine-type: <label> <3>
sigs.k8s.io/cluster-api-machineset: <cluster_name>-<label>-<AWS-zone> <4>
----
<1> Specify the name of the MachineHealthCheck to deploy. Include the name of the
MachinePool to track.
<2> Specify the namespace to deploy the MachineHealthCheck to.
<3> Specify the name of your cluster.
<4> Specify a label for the MachinePool that you want to check.
<5> Specify the MachineSet to track in `<cluster_name>-<label>-<AWS-zone>`
<2> Specify the name of your cluster.
<3> Specify a label for the MachinePool that you want to check.
<4> Specify the MachineSet to track in `<cluster_name>-<label>-<AWS-zone>`
format. For example, `prod-node-us-east-1a`.
////
.MachinePoolHealthCheck

View File

@@ -1,6 +1,6 @@
// Module included in the following assemblies:
//
// * machine_management/creating-infrastructure-machinesets.adoc
// * machine-management/creating-infrastructure-machinesets.adoc
[id='machineset-creating-{context}']
= Creating a MachineSet
@@ -20,7 +20,7 @@ you copy an existing MachineSet from your cluster and modify it.
+
[source,bash]
----
$ oc get machinesets -n openshift-cluster-api
$ oc get machinesets -n openshift-machine-api
NAME DESIRED CURRENT READY AVAILABLE AGE
190125-3-worker-us-west-1b 2 2 2 2 3h
@@ -32,7 +32,7 @@ NAME DESIRED CURRENT READY AVAILABLE AGE
[source,bash]
----
$ oc get machineset <machineset_name> -n \
openshift-cluster-api -o yaml > <file_name>.yaml
openshift-machine-api -o yaml > <file_name>.yaml
----
+
In this command, `<machineset_name>` is the name of the current MachineSet that
@@ -52,9 +52,9 @@ metadata:
sigs.k8s.io/cluster-api-machine-role: <machine_label> <3>
sigs.k8s.io/cluster-api-machine-type: <machine_label> <3>
name: <cluster_name>-<machine_label>-<AWS-availability-zone> <3> <4>
namespace: openshift-cluster-api
namespace: openshift-machine-api
resourceVersion: "9249" <1>
selfLink: /apis/cluster.k8s.io/v1alpha1/namespaces/openshift-cluster-api/machinesets/<cluster_name>-<machine_label>-<AWS-availability-zone> <1>
selfLink: /apis/cluster.k8s.io/v1alpha1/namespaces/openshift-machine-api/machinesets/<cluster_name>-<machine_label>-<AWS-availability-zone> <1>
uid: 59ba0425-313f-11e9-861e-0a18047f0a28 <1>
----
<1> Remove this line.
@@ -73,7 +73,7 @@ metadata:
sigs.k8s.io/cluster-api-machine-role: <new_machine_label>
sigs.k8s.io/cluster-api-machine-type: <new_machine_label>
name: <cluster_name>-<new_machine_label>-<AWS-availability-zone>
namespace: openshift-cluster-api
namespace: openshift-machine-api
----
. In `<file_name>.yaml`, delete the `status` stanza:
@@ -218,7 +218,7 @@ $ oc create -f <file_name>.yaml
+
[source,bash]
----
$ oc get machineset -n openshift-cluster-api
$ oc get machineset -n openshift-machine-api
NAME DESIRED CURRENT READY AVAILABLE AGE
@@ -234,7 +234,7 @@ If the MachineSet is not available, wait a few minutes and run the command again
+
[source,bash]
----
$ oc get machine -n openshift-cluster-api
$ oc get machine -n openshift-machine-api
----
. View the new node: