SpotiByeAds
SpotiByeAds copied to clipboard
Unable to deploy on Kubernetes
I am trying to deploy Hygieia on Kubernetes but I am unable to do it. I have successfully deployed the Hygieia UI on K8s but unable to get the API and mongo working together. FYI, I am using MongoDB replica sets in k8s. Also, I am unable to figure out what should I write in api.properties(dbhost: ) I tried with the service name of mongo and the label of service of mongo pod, but still no success. If someone has deployed it on k8s or has some documentation, please share.
we are lookin for help in this area. If you find success we would greatly appreciate
Use below env on your deployment files. API_HOST, API_PORT, DB_HOST, DB_PORT
Hi! Im also working on this. Should we setup a meeting somehow someday?
I've managed to run these services on kubernetes:
- API
- UI
- Audit-API
- Jira Collector
- GitHub Collector
There are some caveats regarding the state for the collectors and scaling them up, but it works!
I am currently working on the AWS Collector for the Cloud view and I will create helm charts for the deployment.
Did you manage to deploy this?
Hello @cristian04, sounds cool. I was able to deploy API, UI in Kubernetes but when I was trying to signup in my dashboard I was getting error user already exists, i also increases the auth. expiration time still the same issue, Later I figure out I had some cors issue as well so I solved it anyhow but then when i tried to signup, it took me to the home page with a cross sign-on API connectivity. Problem is UI ana Api are working fine individually but when api is getting called via ui its not working fine, basically ui pod and api pod is not able to communicate properly
It would be really helpful @cristian04 if u share your deployment, service, and ingress YAML files. And one thing more are u using replica sets for MongoDB pods?
Hi we have deployed on kubernetes and that are working fine
This would be the file for hygieia-ui deployment
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: hygieia-ui
labels:
app: hygieia-ui
spec:
replicas: 1
selector:
matchLabels:
app: hygieia-ui
template:
metadata:
labels:
name: hygieia-ui
app: hygieia-ui
spec:
hostname: hygieia-ui
containers:
- name: hygieia-ui
image: <image name here>
imagePullPolicy: IfNotPresent
env:
- name: API_HOST
value: "hygieia-api"
- name: API_PORT
value: <port for api>
resources:
limits:
cpu: <max cpu needed >
memory: <max mem needed>
requests:
cpu: <min cpu needed >
memory: <min mem needed>
ports:
- containerPort: <port>
Thanks @Ayush-Goyal-coding for sharing for deployment file, but are you using the replica sets for MongoDb?
@kopal2212 no We can't have replica sets of mongodb pod it seems
There is some documentation on mongodb official page check that out and let me know if that's useful
@Ayush-Goyal-coding Thanks but it is not like that, For High Availability, we often use multiple MongoDB pods. So for Hygieia also I did the same, deployed multiple pods of MongoDB in K8s with stateful sets, but I am stuck with the communication with the pods. Let me figure out if i can have a workaround for it. Alternatively, I have deployed Hygieia on EC2 by configuring the collectors as services with Systemd. It is also working fine for now.
Hi all! Apologies for the delay sharing my manifests. Please find them on this repo: https://github.com/clvr-cloud/hygiea-devops-poc
Thanks @cristian04
Thanks @cristian04
Thanks @kopal2212 for your comments too
Hi @kopal2212 I am trying to deploy Hygieia dashboard on k8s but not able to do so!! can you please share the Hygieia - UI and api deployment yaml and service yaml file so that I can refer that for deploying in K8s... It will be great help!!!