Skip to content

Commit ce724a1

Browse files
Added instructions to install KRR in-cluster (#387)
1 parent 4c657aa commit ce724a1

File tree

5 files changed

+144
-0
lines changed

5 files changed

+144
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,28 @@ us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:v1.8.3
189189
We do **not** recommend installing KRR from source in airgapped environments due to the headache of installing Python dependencies. Use one of the above methods instead and contact us (via Slack, GitHub issues, or email) if you need assistance.
190190
</details>
191191

192+
<details>
193+
<summary>In-Cluster</summary>
194+
195+
Apart from running KRR as a CLI tool you can also run KRR inside your cluster. We suggest installing KRR via the <a href="https://platform.robusta.dev/signup">Robusta Platform</a>
196+
. It gives you a <a href="https://platform.robusta.dev/signup">free UI</a> with some features like the following
197+
* View application usage history graphs on which recommendations are based.
198+
* Get application, namespace and cluster level recommendations.
199+
* YAML configuration to apply the suggested recommendation and more
200+
201+
<img src="./images/ui_screenshot_new.png">
202+
203+
<img src="./images/ui_recommendation.png">
204+
205+
You can also run KRR in-cluster as a Kubernetes Job, if you don't want to view results easily in a <a href="https://platform.robusta.dev/signup">UI</a>.
206+
207+
```
208+
kubectl apply -f https://raw.githubusercontent.com/robusta-dev/krr/refs/heads/main/docs/krr-in-cluster/krr-in-cluster-job.yaml
209+
210+
```
211+
</details>
212+
213+
192214
<details>
193215
<summary>From Source</summary>
194216

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
kind: ClusterRole
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
metadata:
4+
name: krr-cluster-role
5+
namespace: default
6+
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- configmaps
11+
- daemonsets
12+
- deployments
13+
- namespaces
14+
- pods
15+
- replicasets
16+
- replicationcontrollers
17+
- services
18+
verbs:
19+
- get
20+
- list
21+
- watch
22+
23+
- apiGroups:
24+
- ""
25+
resources:
26+
- nodes
27+
verbs:
28+
- get
29+
- list
30+
- watch
31+
32+
- apiGroups:
33+
- apps
34+
resources:
35+
- daemonsets
36+
- deployments
37+
- deployments/scale
38+
- replicasets
39+
- replicasets/scale
40+
- statefulsets
41+
verbs:
42+
- get
43+
- list
44+
- watch
45+
46+
- apiGroups:
47+
- extensions
48+
resources:
49+
- daemonsets
50+
- deployments
51+
- deployments/scale
52+
- ingresses
53+
- replicasets
54+
- replicasets/scale
55+
- replicationcontrollers/scale
56+
verbs:
57+
- get
58+
- list
59+
- watch
60+
- apiGroups:
61+
- batch
62+
resources:
63+
- cronjobs
64+
- jobs
65+
verbs:
66+
- get
67+
- list
68+
- watch
69+
- apiGroups:
70+
- "autoscaling"
71+
resources:
72+
- horizontalpodautoscalers
73+
verbs:
74+
- get
75+
- list
76+
- watch
77+
78+
---
79+
apiVersion: v1
80+
kind: ServiceAccount
81+
metadata:
82+
name: krr-service-account
83+
namespace: default
84+
---
85+
apiVersion: rbac.authorization.k8s.io/v1
86+
kind: ClusterRoleBinding
87+
metadata:
88+
name: krr-cluster-role-binding
89+
roleRef:
90+
apiGroup: rbac.authorization.k8s.io
91+
kind: ClusterRole
92+
name: krr-cluster-role
93+
subjects:
94+
- kind: ServiceAccount
95+
name: krr-service-account
96+
namespace: default
97+
98+
---
99+
apiVersion: batch/v1
100+
kind: Job
101+
metadata:
102+
name: krr
103+
namespace: default
104+
spec:
105+
template:
106+
spec:
107+
containers:
108+
- command:
109+
- /bin/sh
110+
- -c
111+
- "python krr.py simple --max-workers 3 --width 2048 "
112+
image: robustadev/krr:v1.17.0
113+
imagePullPolicy: Always
114+
name: krr
115+
resources:
116+
limits:
117+
memory: 2Gi
118+
requests:
119+
memory: 1Gi
120+
restartPolicy: Never
121+
serviceAccount: krr-service-account
122+
serviceAccountName: krr-service-account

images/ui_recommendation.png

156 KB
Loading

images/ui_screenshot.jpeg

-481 KB
Binary file not shown.

images/ui_screenshot_new.png

198 KB
Loading

0 commit comments

Comments
 (0)