{"id":15823851,"url":"https://github.com/stefh/kubernetesexample","last_synced_at":"2025-08-19T08:38:55.857Z","repository":{"id":149586556,"uuid":"154451206","full_name":"StefH/KubernetesExample","owner":"StefH","description":"A example project about Kubernetes and C# WebApi","archived":false,"fork":false,"pushed_at":"2018-10-30T13:52:02.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T22:30:54.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StefH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-24T06:37:36.000Z","updated_at":"2019-04-29T07:01:30.000Z","dependencies_parsed_at":"2023-09-24T07:17:30.599Z","dependency_job_id":null,"html_url":"https://github.com/StefH/KubernetesExample","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"8e4949f655fe28f7260e688985580ff5b8a3174f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StefH/KubernetesExample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FKubernetesExample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FKubernetesExample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FKubernetesExample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FKubernetesExample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefH","download_url":"https://codeload.github.com/StefH/KubernetesExample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FKubernetesExample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271123320,"owners_count":24703204,"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-08-19T02:00:09.176Z","response_time":63,"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":"2024-10-05T08:23:42.380Z","updated_at":"2025-08-19T08:38:55.824Z","avatar_url":"https://github.com/StefH.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KubernetesExample\nA example project about Kubernetes and C# WebApi\n\n# Docker\n## Common\n### 0. Go to the `KubernetesExampleWebApi` folder\n```\ncd src\\KubernetesExampleWebApi\n```\n\n## Linux Commands\n### 1. Build\n```\ndocker build -t sheyenrath/kubernetes-example -f .\\Dockerfile.linux .\n```\n\n### 2. Delete dangling images (optional)\n```\ndocker rmi $(docker images -f \"dangling=true\" -q)\n```\n\n### 3. Run\n```\ndocker run -it -p 54331:80 --rm sheyenrath/kubernetes-example\n```\n\n### 4. Push\n```\ndocker push sheyenrath/kubernetes-example:latest\n```\n\n## Windows Nano Commands\n### 1. Build\n```\ndocker build -t sheyenrath/kubernetes-example-nano -f .\\Dockerfile .\n```\n\n### 2. Delete dangling images (optional)\n```\ndocker rmi $(docker images -f \"dangling=true\" -q)\n```\n\n### 3. Run\n```\ndocker run -it -p 54331:80 --rm sheyenrath/kubernetes-example-nano\n```\n\n### 4. Push\n```\ndocker push sheyenrath/kubernetes-example:latest\n```\n\n## Common\n### 5. Test using curl\n```\ncurl http://localhost:54331/api/values\ncurl http://localhost:54331/api/values/0\ncurl http://localhost:54331/api/values/1\n```\n\n\n# Kubernetes\n## Commands\n### 0. Go to your cluster \n\n### 1. Create the solution\n```\nkubectl apply -f kubernetes_deployment.yml\n```\n\n### 2a. Get service information\n```\nkubectl get svc\n\u003e\u003e\nNAME                                TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE\nkubernetes                          ClusterIP      10.96.0.1      \u003cnone\u003e        443/TCP        56m\nkubernetes-example-service-redis    ClusterIP      10.108.44.31   \u003cnone\u003e        6379/TCP       43m\nkubernetes-example-service-webapi   LoadBalancer   10.110.194.8   \u003cpending\u003e     80:30750/TCP   1m\n```\n\n### 2b. Describe all services\n```\nkubectl describe svc\n```\n\n### 3. Get all Pods\n```\nkubectl get pods\n\u003e\u003e\nNAME                                                    READY     STATUS    RESTARTS   AGE\nkubernetes-example-deployment-redis-57cf4bdcb8-5897m    1/1       Running   0          53m\nkubernetes-example-deployment-webapi-7bf95cf4b8-pnpmx   1/1       Running   0          3m\n```\n\n### 4. Describe all pods\n```\nkubectl describe pods\n\n```\n\n### 5. Test using curl\ntest redis connectionstring via ip-address from the pod (**TODO**)\n```\ncurl http://10.110.194.8/api/test/10-40-0-1.default.cluster.local\n```\n\ntest redis connectionstring via ip-address from the kubernetes-example-service-webapi service (**TODO**)\n```\ncurl ???\n```\n\ntest redis connectionstring via svc\n**TODO** : my-svc.my-namespace.svc.cluster.local\n\nnon cached\n```\ncurl http://10.110.194.8/api/values\ncurl http://10.110.194.8/api/values/0\ncurl http://10.110.194.8/api/values/1\n```\n\ncached\n```\ncurl http://10.110.194.8/api/valuescached\ncurl http://10.110.194.8/api/valuescached/0\ncurl http://10.110.194.8/api/valuescached/1\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fkubernetesexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefh%2Fkubernetesexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fkubernetesexample/lists"}