{"id":24629504,"url":"https://github.com/framsouza/custom-kubernetes-controller","last_synced_at":"2026-05-15T08:35:35.347Z","repository":{"id":52151769,"uuid":"520488629","full_name":"framsouza/custom-kubernetes-controller","owner":"framsouza","description":"Custom kubernetes controller","archived":false,"fork":false,"pushed_at":"2022-08-03T08:47:03.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T04:40:06.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/framsouza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-02T12:26:31.000Z","updated_at":"2022-08-03T08:46:39.000Z","dependencies_parsed_at":"2022-09-09T01:41:08.035Z","dependency_job_id":null,"html_url":"https://github.com/framsouza/custom-kubernetes-controller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/framsouza/custom-kubernetes-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Fcustom-kubernetes-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Fcustom-kubernetes-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Fcustom-kubernetes-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Fcustom-kubernetes-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/framsouza","download_url":"https://codeload.github.com/framsouza/custom-kubernetes-controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Fcustom-kubernetes-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013683,"owners_count":26085390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-25T06:13:09.119Z","updated_at":"2025-10-13T04:34:41.002Z","avatar_url":"https://github.com/framsouza.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Custom kubernetes controller\n\nThis is a very simple example on how to create a Kubernetes controller that automatically create a service and ingress controller when a deployment is created.\n\n### Usage\nYou have to apply the deployment.yml which will create a deployment call `custom-controller` in the `kube-system` namespace, everytime you create a deployment a service and a ingress will be created. Make sure you have a ingress controller up and running.\nThe ingress host will be `servicename`.`domain.io` feel free to change it to your own domain. The ingress and service resource will have the same name as the deployment.\n\nOnce you delete the deployment, the service and ingress will be automatically deleted.\n\n```\n% kubectl create deployment nginx --image nginx\ndeployment.apps/nginx created\n\n$ kubectl logs deployment/custom-controller -n kube-system \nAdding deployment\nCreating service named nginx\n\n$ kubectl get svc\nNAME                            TYPE           CLUSTER-IP     EXTERNAL-IP     PORT(S)                      AGE\nnginx                           ClusterIP      10.3.247.100   \u003cnone\u003e          80/TCP                       48s\n\n$ kubectl get ingress\nNAME    CLASS    HOSTS             ADDRESS         PORTS   AGE\nnginx   \u003cnone\u003e   nginx.domain.io   34.79.195.242   80      77s\n\n$ kubectl delete deployment nginx\ndeployment.apps \"nginx\" deleted\n\n$ kubectl logs deployment/custom-controller -n kube-system \nDeleting deployment named, nginx\nDeleting service nginx\nDeleting ingress nginx\n```\n\n### To be improved\n- Automatically collect the deployment port/name, for now it's listening only to port 80;\n- Automatically recreate svc and ingress resources if it's deleted, logic still not implemented;\n- Refer to annotation or owner to delete resources;","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fframsouza%2Fcustom-kubernetes-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fframsouza%2Fcustom-kubernetes-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fframsouza%2Fcustom-kubernetes-controller/lists"}