-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
how to deploy the load-watcher as a service? #56
Comments
load-watcher-deployment.yaml can be something like:
|
Thanks a lot for your reply. Hope to add this file to the repo soon. |
lenhattan86
pushed a commit
that referenced
this issue
May 16, 2023
you may need rbac if you are using metrics server apiVersion: v1
kind: ServiceAccount
metadata:
name: load-watcher
namespace: loadwatcher
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: load-watcher-role
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: load-watcher-binding
subjects:
- kind: ServiceAccount
name: load-watcher
namespace: loadwatcher
roleRef:
kind: ClusterRole
name: load-watcher-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: load-watcher-deployment
namespace: loadwatcher
labels:
app: load-watcher
spec:
replicas: 1
selector:
matchLabels:
app: load-watcher
template:
metadata:
labels:
app: load-watcher
spec:
serviceAccountName: load-watcher
containers:
- name: load-watcher
image: load-watcher:1
ports:
- containerPort: 2020
---
apiVersion: v1
kind: Service
metadata:
namespace: loadwatcher
name: load-watcher
labels:
app: load-watcher
spec:
type: ClusterIP
ports:
- name: http
port: 2020
targetPort: 2020
protocol: TCP
selector:
app: load-watcher |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Hi all,
I found this line in README:
kubectl create -f manifests/load-watcher-deployment.yaml
but I did not find the
manifests/load-watcher-deployment.yaml
in repo.Maybe a sample deployment file is needed?
thanks.
The text was updated successfully, but these errors were encountered: