{"id":20371577,"url":"https://github.com/atulkamble/k8s-application-deployment-aws-eks-ecr","last_synced_at":"2026-02-07T15:32:42.987Z","repository":{"id":200480332,"uuid":"700182633","full_name":"atulkamble/k8s-application-deployment-aws-eks-ecr","owner":"atulkamble","description":"This project demonstrates the deployment of a .NET 7 application on Kubernetes using AWS Elastic Kubernetes Service (EKS) and Docker. It provides a comprehensive guide on setting up your development environment, building and running the application, Dockerizing it, and deploying it to AWS.","archived":false,"fork":false,"pushed_at":"2024-08-13T08:13:00.000Z","size":2389,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T15:42:07.597Z","etag":null,"topics":["aws","docker","ecr","ecs","eks","kubernetes"],"latest_commit_sha":null,"homepage":"http://linkedin.com/in/atuljkamble","language":"CSS","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/atulkamble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"atulkamble"}},"created_at":"2023-10-04T05:30:29.000Z","updated_at":"2024-08-13T08:13:04.000Z","dependencies_parsed_at":"2024-08-13T12:34:59.027Z","dependency_job_id":null,"html_url":"https://github.com/atulkamble/k8s-application-deployment-aws-eks-ecr","commit_stats":null,"previous_names":["atulkamble/k8s-app-eks"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atulkamble/k8s-application-deployment-aws-eks-ecr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atulkamble%2Fk8s-application-deployment-aws-eks-ecr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atulkamble%2Fk8s-application-deployment-aws-eks-ecr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atulkamble%2Fk8s-application-deployment-aws-eks-ecr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atulkamble%2Fk8s-application-deployment-aws-eks-ecr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atulkamble","download_url":"https://codeload.github.com/atulkamble/k8s-application-deployment-aws-eks-ecr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atulkamble%2Fk8s-application-deployment-aws-eks-ecr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29198178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aws","docker","ecr","ecs","eks","kubernetes"],"created_at":"2024-11-15T01:08:35.152Z","updated_at":"2026-02-07T15:32:42.971Z","avatar_url":"https://github.com/atulkamble.png","language":"CSS","funding_links":["https://github.com/sponsors/atulkamble"],"categories":[],"sub_categories":[],"readme":"# Kubernetes Application Deployment with AWS EKS and ECR\n\nThis project demonstrates the deployment of a .NET 7 application on Kubernetes using AWS Elastic Kubernetes Service (EKS) and Docker. Follow the steps below to clone the repository, build and run the application, and deploy it to AWS.\n\n## Prerequisites\n\n- **Git**: Version control system\n- **GitHub Desktop**: Git client for desktop\n- **Visual Studio**: IDE for .NET development\n- **PowerShell**: Command-line shell\n- **.NET 7 SDK**: Development platform for building applications\n\n## Steps to Setup and Run the Project\n\n### 1. Clone the Repository\n```\ngit clone https://github.com/atulkamble/k8s-application-deployment-aws-eks-ecr.git\ncd k8s-application-deployment-aws-eks-ecr\n```\n\n### 2. Open and Run the Project\n- Open the solution file within the `k8s-App-EKS` directory using Visual Studio.\n- Run the project from Visual Studio to ensure it works correctly.\n\n### 3. Commit Changes\n- If you make any changes, commit them to the same repository:\n```bash\ngit add .\ngit commit -m \"Your commit message\"\ngit push origin main\n```\n\n### 4. Raise an Issue\n- If you encounter any issues, raise them in the repository's issue tracker.\n- Reference: [Build a .NET Core Docker Container](https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?tabs=windows\u0026pivots=dotnet-7-0)\n\n## Dockerize the Application\n\n### 1. Build the Application\n```bash\ncd k8s-App-EKS\ndotnet publish -c Release\n```\n- The following paths will be created:\n  - `k8s-App` -\u003e `D:\\GitHub\\k8s-App-EKS\\k8s-App\\k8s-App\\bin\\Release\\net7.0\\k8s-App.dll`\n  - `k8s-App` -\u003e `D:\\GitHub\\k8s-App-EKS\\k8s-App\\k8s-App\\bin\\Release\\net7.0\\publish\\`\n\n### 2. Create Dockerfile\nNavigate to the project directory and create a Dockerfile:\n```bash\ncd D:\\GitHub\\k8s-App-EKS\\k8s-App\\k8s-App\nNew-Item Dockerfile\ncode Dockerfile\n```\nPaste the following code into the Dockerfile:\n```dockerfile\n# Use the official .NET SDK image to build the application\nFROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env\nWORKDIR /App\n\n# Copy all files to the container\nCOPY . ./\n# Restore dependencies\nRUN dotnet restore\n# Build and publish the application\nRUN dotnet publish -c Release -o out\n\n# Use the official ASP.NET runtime image for running the application\nFROM mcr.microsoft.com/dotnet/aspnet:7.0\nWORKDIR /App\nCOPY --from=build-env /App/out .\nENTRYPOINT [\"dotnet\", \"k8s-App.dll\"]\n```\n\n### 3. Build and Run Docker Container\n- Build the Docker image:\n```bash\ndocker build -t counter-image -f Dockerfile .\n```\n- Start Docker Engine and list Docker images:\n```bash\ndocker images\n```\n- Create a container from the image:\n```bash\ndocker create --name core-counter counter-image\n```\n- List all containers:\n```bash\ndocker ps -a\n```\n- Manage the container:\n```bash\ndocker start core-counter\ndocker ps\n```\n- Stop the container:\n```bash\ndocker stop core-counter\ndocker ps\n```\n- Connect to the container:\n```bash\ndocker attach --sig-proxy=false core-counter\n```\n- Delete the container:\n```bash\ndocker stop core-counter\ndocker rm core-counter\n```\n- Run the container interactively:\n```bash\ndocker run -it --rm counter-image\n```\n\n## Deploy to AWS ECR\n\n### 1. Configure AWS CLI\n- Sign in to AWS IAM, create a user, group, and assign policies.\n- Configure AWS CLI:\n```bash\naws configure\n```\n- Authenticate Docker with AWS ECR:\n```bash\naws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 316290926278.dkr.ecr.us-east-1.amazonaws.com\n```\n\n### 2. Tag and Push Docker Image\n- Tag the Docker image:\n```bash\ndocker tag counter-image:latest 316290926278.dkr.ecr.us-east-1.amazonaws.com/counter-image:latest\n```\n- Push the Docker image to ECR:\n```bash\ndocker push 316290926278.dkr.ecr.us-east-1.amazonaws.com/counter-image:latest\n```\n\nBy following these steps, you will have successfully Dockerized your .NET 7 application, built a Docker image, and pushed it to AWS ECR for deployment on AWS EKS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatulkamble%2Fk8s-application-deployment-aws-eks-ecr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatulkamble%2Fk8s-application-deployment-aws-eks-ecr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatulkamble%2Fk8s-application-deployment-aws-eks-ecr/lists"}