diff --git a/README.md b/README.md index 35ae0388..e06545ba 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,28 @@ us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:v1.8.3 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. +
+ In-Cluster + +Apart from running KRR as a CLI tool you can also run KRR inside your cluster. We suggest installing KRR via the Robusta Platform +. It gives you a free UI with some features like the following +* View application usage history graphs on which recommendations are based. +* Get application, namespace and cluster level recommendations. +* YAML configuration to apply the suggested recommendation and more + + + + + +You can also run KRR in-cluster as a Kubernetes Job, if you don't want to view results easily in a UI. + +``` +kubectl apply -f https://raw.githubusercontent.com/robusta-dev/krr/refs/heads/main/docs/krr-in-cluster/krr-in-cluster-job.yaml + +``` +
+ +
From Source diff --git a/docs/krr-in-cluster/krr-in-cluster-job.yaml b/docs/krr-in-cluster/krr-in-cluster-job.yaml new file mode 100644 index 00000000..a73ffae2 --- /dev/null +++ b/docs/krr-in-cluster/krr-in-cluster-job.yaml @@ -0,0 +1,122 @@ +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: krr-cluster-role + namespace: default +rules: + - apiGroups: + - "" + resources: + - configmaps + - daemonsets + - deployments + - namespaces + - pods + - replicasets + - replicationcontrollers + - services + verbs: + - get + - list + - watch + + - apiGroups: + - "" + resources: + - nodes + verbs: + - get + - list + - watch + + - apiGroups: + - apps + resources: + - daemonsets + - deployments + - deployments/scale + - replicasets + - replicasets/scale + - statefulsets + verbs: + - get + - list + - watch + + - apiGroups: + - extensions + resources: + - daemonsets + - deployments + - deployments/scale + - ingresses + - replicasets + - replicasets/scale + - replicationcontrollers/scale + verbs: + - get + - list + - watch + - apiGroups: + - batch + resources: + - cronjobs + - jobs + verbs: + - get + - list + - watch + - apiGroups: + - "autoscaling" + resources: + - horizontalpodautoscalers + verbs: + - get + - list + - watch + +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: krr-service-account + namespace: default +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: krr-cluster-role-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: krr-cluster-role +subjects: + - kind: ServiceAccount + name: krr-service-account + namespace: default + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: krr + namespace: default +spec: + template: + spec: + containers: + - command: + - /bin/sh + - -c + - "python krr.py simple --max-workers 3 --width 2048 " + image: robustadev/krr:v1.17.0 + imagePullPolicy: Always + name: krr + resources: + limits: + memory: 2Gi + requests: + memory: 1Gi + restartPolicy: Never + serviceAccount: krr-service-account + serviceAccountName: krr-service-account diff --git a/images/ui_recommendation.png b/images/ui_recommendation.png new file mode 100644 index 00000000..5743ae21 Binary files /dev/null and b/images/ui_recommendation.png differ diff --git a/images/ui_screenshot.jpeg b/images/ui_screenshot.jpeg deleted file mode 100644 index 08a6d381..00000000 Binary files a/images/ui_screenshot.jpeg and /dev/null differ diff --git a/images/ui_screenshot_new.png b/images/ui_screenshot_new.png new file mode 100644 index 00000000..245086b3 Binary files /dev/null and b/images/ui_screenshot_new.png differ