{"id":19513072,"url":"https://github.com/anirudh1905/leaf_classification","last_synced_at":"2026-05-02T23:43:02.759Z","repository":{"id":170999450,"uuid":"647243538","full_name":"Anirudh1905/Leaf_Classification","owner":"Anirudh1905","description":"GCP Deployment","archived":false,"fork":false,"pushed_at":"2023-05-30T13:58:08.000Z","size":10218,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T12:10:09.670Z","etag":null,"topics":["ci-cd","cloudbuild","docker","gcp","gcr-registry","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/Anirudh1905.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T11:13:37.000Z","updated_at":"2023-05-30T13:59:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3d757d9-21ab-4118-91b9-303c45694f0d","html_url":"https://github.com/Anirudh1905/Leaf_Classification","commit_stats":null,"previous_names":["anirudh1905/leaf_classification"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anirudh1905%2FLeaf_Classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anirudh1905%2FLeaf_Classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anirudh1905%2FLeaf_Classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anirudh1905%2FLeaf_Classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anirudh1905","download_url":"https://codeload.github.com/Anirudh1905/Leaf_Classification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240762327,"owners_count":19853461,"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","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":["ci-cd","cloudbuild","docker","gcp","gcr-registry","kubernetes"],"created_at":"2024-11-10T23:28:40.203Z","updated_at":"2026-05-02T23:43:02.707Z","avatar_url":"https://github.com/Anirudh1905.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Leaf Classification\n\nGCP Deployment using Docker, Kubernetes and enabling CI/CD using Cloud Build\n\n* Create the model and save it in the models folder\n* Move to GCP console and clone the repository\n* Create a kubernetes cluster by specifying the name of cluster, region, instance type, nodes etc.\n* Create deployments.yaml file with docker image and ports of container for deploying the pods\n* Create service.yaml file for exposing our application to website by linking the web port with the container port\n* To enable CI/CD we can use `Cloudbuild` in which we can write all the steps and set the trigger so once we push a code change new docker image gets build and gets pushed to `GCR` and starts running the pods in the kubernetes cluster using the deployment.yaml and service.yaml files.\n\n## Kubernetes Cheatcodes\n\nBuilding the container image -\n\n```\ngcloud builds submit --tag gcr.io//\u003cimage_name\u003e .\n```\n\nList the image -\n\n```\ngcloud builds list --filter \u003cimage_name\u003e\n```\n\nChecking logs of built image -\n\n```\ngcloud builds log\n```\n\nCreate Kubernetes Cluster -\n\n```\ngcloud container clusters create \u003ccluster_name\u003e --zone \"us-west1-b\" --machine-type \"n1-standard-1\" --num-nodes \"1\" --service-account \u003cservice_account_name\u003e\n```\n\nCreate Kubernetes Deployment -\n\n```\nkubectl apply -f deployment.yaml\n```\n\nGet details on deployed application -\n\n```\nkubectl get deployments\n```\n\nGet info of created pods via deployment -\n\n```\nkubectl get pods\n```\n\nDecribe deployed pod -\n\n```\nkubectl describe pod\n```\n\nGet pod logs -\n\n```\nkubectl logs\n```\n\nCreate service for deployment -\n\n```\nkubectl apply -f service.yaml\n```\n\nGet service details -\n\n```\nkubectl get services\n```\n\nAdd nodes to cluster -\n\n```\ngcloud container clusters resize \u003ccluster_name\u003e --num-nodes 3 --zone us-west1-b\n```\n\nGet details on cluster -\n\n```\ngcloud container clusters list\n```\n\nScale pod replicas -\n\n```\nkubectl scale deployment \u003cdeployment_name\u003e --replicas 2\n```\n\nAuto Scale setting in deployment -\n\n```\nkubectl autoscale deployment \u003cdeployment_name\u003e --max 6 --min 2 --cpu-percent 50\n```\n\nGet details on horizontal pod autoscaler -\n\n```\nkubectl get hpa\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanirudh1905%2Fleaf_classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanirudh1905%2Fleaf_classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanirudh1905%2Fleaf_classification/lists"}