kitarp29 / kube-ez

This is a simple k8s-api project. It is built on Golang and utilises the client-go library to interact with Kubernetes Cluster. It is a plug and play solution and can be used to create a k8s-api server.
MIT License
71 stars 12 forks source link

Make a Helm chart #22

Closed kitarp29 closed 1 year ago

kitarp29 commented 1 year ago

We could actually make a Helm chart to ease the process of installing this project on any k8s cluster

kitarp29 commented 1 year ago

This is turning out to be more complicated than I thought initially.

Things I tried:

Error I am often running into: CrashLoopBackOff I got to know why this is the most infamous error in Kubernetes Cluster. My Deployment keeps on crashing and IDK Why?!! Error Code is 2, which means it's an internal app issue. I applied to log in to the project last week any error internally would have come up. In the meanwhile the same project is running independently

github-actions[bot] commented 1 year ago

Stale issue message

kitarp29 commented 1 year ago

Maybe something we can look into Helmify

github-actions[bot] commented 1 year ago

Stale issue message

kitarp29 commented 1 year ago

What If I added all the YAMLs needed to run the project into one and then make a Helm chart out of it? I know it is gonna be a hell lot of insecure practices and a big NO NO! But ehh, it's a side project, I wanna build something cool! image

kitarp29 commented 1 year ago

Did this! Commit Here

kitarp29 commented 1 year ago

This got me interested in My CI jobs should run only on go files. Why the Hell my runner is running when I have changes on Markdown files :( I know it's not costing me anything, but still, it's against my ethics! Also, I can't sleep, so let's build this out! image

kitarp29 commented 1 year ago

YES!! I was able to do it on my Local! The chart works smoothly and flawlessly.

Would you like to try it? Download this file : Here And then run this command:

helm install kube-ez-chart kube-ez-chart-0.1.0.tgz

If your Kubernetes cluster is configured to have access to the docker hub it will spin up a pod with Kube-EZ.

To access the API try this:

  kubectl port-forward kube-ez 8000:8000

API will be running at localhost:8000 now.


Next Steps:

Now I can sleep in peace :) jeff-goldblum-crazy-son-of-a-bitch

kitarp29 commented 1 year ago

Look into this: https://github.com/helm/chart-releaser

kitarp29 commented 1 year ago

Yaaaaaaarrrrrr! This is a weird issue I am failing to use it in my local cluster. The helm chart is installing the SA and the CRB. Even the pod is created. But the pod runs into an ErrImagePull. The potential issue is that the cluster can't access to DockerHub. I will try once after adding my credentials as a secret to my cluster.

When you spend two holidays making something and still it doesn't work out :(

image

kitarp29 commented 1 year ago

Ok, I just learned this today. I am ashamed to admit I got to know this so late! So Helm Charts installs resources in the order you want to. But it will not monitor the resources in any way. Thus, giving so much time on a Helm chart seems unnecessary to me.

I am so done with it!

image

If anyone still really wants to try it:

Download this file : Here And then run this command:

helm install kube-ez-chart kube-ez-chart-0.1.0.tgz

If your Kubernetes cluster is configured to have access to the docker hub it will spin up a pod with Kube-EZ.

To access the API try this:

  kubectl port-forward kube-ez 8000:8000

API will be running at localhost:8000 now. Make Sure your Cluster has access to pull from DockerHub