|
5 | 5 | [id='nodes-nodes-problem-detector-installing_{context}']
|
6 | 6 | = Installing the {product-title} Node Problem Detector
|
7 | 7 |
|
8 |
| -You can use the {product-title} console to install the Node Problem Detector (NPD), which creates the Node Problem Detector Operator. |
| 8 | +You can use the {product-title} console to install the Node Problem Detector Operator. |
9 | 9 |
|
10 | 10 | .Prerequisites
|
11 | 11 |
|
12 | 12 | . Create a Project for the NPD:
|
13 | 13 | +
|
14 | 14 | ----
|
15 |
| -$ oc create ns openshift-node-problem-detector |
| 15 | +$ oc create ns openshift-node-problem-detector --node-selector: "" |
16 | 16 | ----
|
17 | 17 |
|
18 | 18 | . Create an Operator Group
|
|
32 | 32 |
|
33 | 33 | .Procedure
|
34 | 34 |
|
35 |
| -To install the Node Problem Detector: |
| 35 | +The process to install the Node Problem Detector involves installing the Node Problem Detector Operator and creating a Node Problem Detector instance. |
36 | 36 |
|
37 | 37 | . In the {product-title} console, click *Catalog* -> *Operator Hub*.
|
38 | 38 |
|
39 |
| -. Choose *node-problem-detector* from the list of available Operators, and click Install. |
40 |
| - |
41 | 39 | . On the *Create Operator Subscription* page:
|
42 | 40 |
|
43 | 41 | .. Select the `openshift-node-problem-detector` project from the *A specific namespace on the cluster* drop-down list.
|
44 | 42 |
|
45 | 43 | .. Click *Subscribe*.
|
46 | 44 |
|
47 |
| -. On the *Catalog* → *Installed Operators* page, verify that the NodeProblemDetector (CSV) eventually shows up and its *Status* ultimately resolves to *InstallSucceeded*. |
| 45 | +.. Click *Subscribe*. |
48 | 46 |
|
| 47 | +. On the *Catalog* → *Installed Operators* page, verify that the NodeProblemDetector (CSV) eventually shows up and its *Status* ultimately resolves to *InstallSucceeded*. |
| 48 | ++ |
49 | 49 | If it does not, switch to the *Catalog* → *Operator Management* page and inspect the *Operator Subscriptions* and *Install Plans* tabs for any failure or errors under *Status*. Then, check the logs in any Pods in the openshift-operators project (on the *Workloads* → *Pods* page) that are reporting issues to troubleshoot further.
|
| 50 | + |
| 51 | +. Click *Administration* -> *CRD*. |
| 52 | + |
| 53 | +. On the *Custom Resource Definitions* page, click *NodeProblemDetector*. |
| 54 | + |
| 55 | +. On the *Node Problem Detector* page, click *Create Node Problem Detector*. |
| 56 | + |
| 57 | +. Specify a name and enter the *openshift-node-problem-detector* namespace. |
| 58 | ++ |
| 59 | +[source,yaml] |
| 60 | +---- |
| 61 | +apiVersion: node-problem-detector.operator.k8s.io/v1alpha1 |
| 62 | +kind: NodeProblemDetector |
| 63 | +metadata: |
| 64 | + name: example |
| 65 | + namespace: default |
| 66 | +spec: {} |
| 67 | +---- |
| 68 | +<1> Specify a name for the Node Problem Detector. |
| 69 | +<2> Specify `openshift-operators` as the namespace. |
| 70 | ++ |
| 71 | +For example: |
| 72 | ++ |
| 73 | +[source,yaml] |
| 74 | +---- |
| 75 | +apiVersion: node-problem-detector.operator.k8s.io/v1alpha1 |
| 76 | +kind: NodeProblemDetector |
| 77 | +metadata: |
| 78 | + name: node-problem-detector |
| 79 | + namespace: openshift-node-problem-detector |
| 80 | +spec: {} |
| 81 | +---- |
| 82 | + |
| 83 | +//Beta steps https://bugzilla.redhat.com/show_bug.cgi?id=1679467 |
| 84 | + |
| 85 | +. Create a Node Problem Detector Custom Resource Definition (CRD): |
| 86 | ++ |
| 87 | +[source,yaml] |
| 88 | +---- |
| 89 | +apiVersion: apiextensions.k8s.io/v1beta1 |
| 90 | +kind: CustomResourceDefinition |
| 91 | +metadata: |
| 92 | + name: nodeproblemdetectors.node-problem-detector.operator.k8s.io |
| 93 | +spec: |
| 94 | + group: node-problem-detector.operator.k8s.io |
| 95 | + names: |
| 96 | + kind: NodeProblemDetector |
| 97 | + listKind: NodeProblemDetectorList |
| 98 | + plural: nodeproblemdetectors |
| 99 | + singular: nodeproblemdetector |
| 100 | + scope: Namespaced |
| 101 | +version: v1alpha1 |
| 102 | +---- |
| 103 | + |
| 104 | +. Create a Node Problem Detector Service Account (SA): |
| 105 | ++ |
| 106 | +[source,yaml] |
| 107 | +---- |
| 108 | +apiVersion: v1 |
| 109 | +kind: ServiceAccount |
| 110 | +metadata: |
| 111 | + name: node-problem-detector-operator |
| 112 | +namespace: openshift-node-problem-detector |
| 113 | +---- |
| 114 | + |
| 115 | +. Create a Node Problem Detector RBAC (RBAC): |
| 116 | ++ |
| 117 | +[source,yaml] |
| 118 | +---- |
| 119 | +kind: Role |
| 120 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 121 | +metadata: |
| 122 | + name: node-problem-detector-operator |
| 123 | + namespace: openshift-node-problem-detector |
| 124 | +rules: |
| 125 | +- apiGroups: |
| 126 | + - node-problem-detector.operator.k8s.io |
| 127 | + resources: |
| 128 | + - "*" |
| 129 | + verbs: |
| 130 | + - "*" |
| 131 | +- apiGroups: |
| 132 | + - "" |
| 133 | + resources: |
| 134 | + - pods |
| 135 | + - events |
| 136 | + - configmaps |
| 137 | + - secrets |
| 138 | + - services |
| 139 | + - endpoints |
| 140 | + - serviceaccounts |
| 141 | + verbs: |
| 142 | + - "*" |
| 143 | +- apiGroups: |
| 144 | + - apps |
| 145 | + resources: |
| 146 | + - daemonsets |
| 147 | + verbs: |
| 148 | + - "*" |
| 149 | +
|
| 150 | +--- |
| 151 | +
|
| 152 | +kind: RoleBinding |
| 153 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 154 | +metadata: |
| 155 | + name: node-problem-detector-operator |
| 156 | + namespace: openshift-node-problem-detector |
| 157 | +subjects: |
| 158 | +- kind: ServiceAccount |
| 159 | + name: node-problem-detector-operator |
| 160 | +roleRef: |
| 161 | + kind: Role |
| 162 | + name: node-problem-detector-operator |
| 163 | + apiGroup: rbac.authorization.k8s.io |
| 164 | +
|
| 165 | +--- |
| 166 | +
|
| 167 | +kind: ClusterRole |
| 168 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 169 | +metadata: |
| 170 | + name: openshift-node-problem-detector-operator |
| 171 | +rules: |
| 172 | +- apiGroups: |
| 173 | + - rbac.authorization.k8s.io |
| 174 | + resources: |
| 175 | + # the operator needs to be able to bind the cluster role |
| 176 | + # system:node-problem-detector to the node-problem-detector service account |
| 177 | + - clusterrolebindings |
| 178 | + verbs: |
| 179 | + - "*" |
| 180 | +- apiGroups: |
| 181 | + - security.openshift.io |
| 182 | + resources: |
| 183 | + # the operator needs to be able to add the node-problem-detector service account |
| 184 | + # to the list of accounts that can use the privileged SCC |
| 185 | + - securitycontextconstraints |
| 186 | + verbs: |
| 187 | + - "*" |
| 188 | +
|
| 189 | +--- |
| 190 | +
|
| 191 | +kind: ClusterRoleBinding |
| 192 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 193 | +metadata: |
| 194 | + name: openshift-node-problem-detector-operator-1 |
| 195 | +subjects: |
| 196 | +- kind: ServiceAccount |
| 197 | + name: node-problem-detector-operator |
| 198 | + namespace: openshift-node-problem-detector |
| 199 | +roleRef: |
| 200 | + kind: ClusterRole |
| 201 | + name: openshift-node-problem-detector-operator |
| 202 | + apiGroup: rbac.authorization.k8s.io |
| 203 | +
|
| 204 | +--- |
| 205 | +
|
| 206 | +oc create -f deploy/rbac.yaml |
| 207 | +oc create -f deploy/operator.yaml |
| 208 | +oc create -f deploy/cr.yaml |
| 209 | +
|
| 210 | +
|
| 211 | +. Create a Node Problem Detector custom resource (CR): |
| 212 | ++ |
| 213 | +[source,yaml] |
| 214 | +---- |
| 215 | +apiVersion: node-problem-detector.operator.k8s.io/v1alpha1 |
| 216 | +kind: NodeProblemDetector |
| 217 | +metadata: |
| 218 | + name: node-problem-detector |
| 219 | +namespace: openshift-node-problem-detector |
| 220 | +---- |
| 221 | +
|
| 222 | +. Configure the Node Problem Detector policy as needed and click *Create*. |
| 223 | +
|
0 commit comments