Build and Deploy .Net Core WebAPI Container to Amazon EKS using CDK & cdk8s

.NET
海外精选
海外精选的内容汇集了全球优质的亚马逊云科技相关技术内容。同时,内容中提到的“AWS” 是 “Amazon Web Services” 的缩写,在此网站不作为商标展示。
0
0
{"value":"In this blog, we will leverage the development capabilities of the [CDK for Kubernetes](https://cdk8s.io/) framework also known as cdk8s along with the [AWS Cloud Development Kit (AWS CDK)](https://docs.aws.amazon.com/cdk/v2/guide/home.html) framework to provision infrastructure through [AWS CloudFormation](https://aws.amazon.com/cn/cloudformation/?trk=cndc-detail).\n\ncdk8s allows us to define Kubernetes apps and components using familiar languages. cdk8s is an open-source software development framework for defining Kubernetes applications and reusable abstractions using familiar programming languages and rich object-oriented APIs. cdk8s apps synthesize into standard Kubernetes manifests which can be applied to any Kubernetes cluster. cdk8s lets you define applications using Typescript, JavaScript, and Python. In this blog we will use Python.\n\nThe [AWS CDK](https://aws.amazon.com/cn/cdk/?trk=cndc-detail) is an open source software development framework to model and provision your cloud application resources using familiar programming languages, including TypeScript, JavaScript, Python, C# and Java.\n\nFor the solution in this blog, we will use C# for the infrastructure code. Completing this walkthrough successfully would take you about couple hours (including installing pre-requisites etc.), so plan accordingly.\n\nLet’s get started!\n\nAt a high-level, we will:\n\n1. Create a simple TODO, Microsoft .NET Core Web API application and integrate with [Amazon Aurora](https://aws.amazon.com/cn/rds/aurora/?trk=cndc-detail) Serverless database, AWS SDK Package like SSM into it.\n2. Use [AWS CDK](https://aws.amazon.com/cn/cdk/?trk=cndc-detail) to define the Infrastructure resources required for the application.\n3. Use cdk8s to define, deploy and run the application within the created Kubernetes cluster (Created above by CDK)\n4. Use [Elastic Kubernetes Service](https://aws.amazon.com/cn/eks/), [Elastic Container Registry (ECR)](https://aws.amazon.com/cn/ecr/), [Amazon Systems Manager (SSM)](https://aws.amazon.com/cn/systems-manager/) (maintains the Aurora DB Credentials).\n5. Use [Amazon Aurora Database (Serverless)](https://aws.amazon.com/cn/rds/aurora/) as the backend.\n\nCreating the infrastructure described above will result in charges beyond free tier. So, review the pricing section below for service-specific details and make sure to clean up the built infrastructure to avoid any recurring cost.\n\n![image.png](https://dev-media.amazoncloud.cn/03d664378c534ba9a42efefcfc72ac21_image.png)\ncdk-cdk8s-architecture\n\nThe [Github source code](https://github.com/aws-samples/aws-cdk-k8s-dotnet-todo) includes a “cdk8s” folder where the .NET application (docker container WebAPI in ECR) will be deployed and run in the Kubernetes cluster. “cdk” folder contains the [AWS Cloud Development Kit](https://aws.amazon.com/cn/cdk/?trk=cndc-detail) (CDK) solution (C# .Net Core) to build the infrastructure. This solution constructs the AWS infrastructure where the “webapi” (.NET Core Web api) is packaged, built as an artifact and pushed to AWS ECR. The .NET project sample uses AWS SDK, Mysql data packages to connect to MySQL and interact with [Amazon Aurora](https://aws.amazon.com/cn/rds/aurora/?trk=cndc-detail) database. The exposed Web API endpoint makes HTTP calls (GET & POST) to add/retrieve TODOs. The end user can use any http get/put tool like curl or UI tools like Google Chrome ARC Rest Client or POSTMAN to validate the changes.\n\n#### **Overview of the AWS services used in this solution**\n\n- [Amazon Aurora](https://aws.amazon.com/cn/rds/aurora/), a MySQL and PostgreSQL-compatible relational database is used as the backend for the purpose of this project.\n- [Amazon Elastic Kubernetes Service](https://aws.amazon.com/cn/eks/) is a fully managed Kubernetes service. EKS runs upstream Kubernetes and is certified Kubernetes conformant so you can leverage all benefits of open source tooling from the community. You can also easily migrate any standard Kubernetes application to EKS without needing to refactor your code.In this example we use cdk8s to deploy the K8s services and pods The code is provided as part of the solution.\n- [Amazon Elastic Container Registry](https://aws.amazon.com/cn/ecr/), the AWS provided Docker container registry is used by EKS Managed worker nodes, simplifying the development to production workflow.\n\n#### **Prerequisites**\n\nWe will use Docker Containers to deploy the Microsoft .NET Web API. The following are required to setup your development environment:\n\n1. [Python >=3.7](https://www.python.org/downloads/release/python-377/)\n2. [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration.html)\n3. [NET Core](https://dotnet.microsoft.com/en-us/download/dotnet/3.1):\n \t1.Web API application was built using Microsoft .NET core 3.1\n\t2.Please refer Microsoft Documentation for installation.\n4. [Docker](https://www.docker.com/)\n1.[Install Docker](https://www.docker.com/products/docker-desktop/) based on your OS.\n2.Make sure the docker daemon is running\n5. [Kubectl](https://kubernetes.io/docs/tasks/tools/)\n6. [AWS CDK >= 1.58.0](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#getting_started_install)\n7. [AWS cdk8s](https://github.com/cdk8s-team/cdk8s/blob/master/docs/getting-started/python.md)\n8. Additionally, we use AWS SDK, MySql data packages for the Microsoft .NET project and have added them as nuget packages to the solution. In this example, we use Mysql data to connect to MySql/Aurora database and also AWS SDK Systems Manager to connect to Amazon Systems Manager.\n\n#### **The Solution**\n\nTo provision the infrastructure (and services) and deploy the application, we will start by cloning the sample code from the [aws-samples](https://github.com/aws-samples/aws-cdk-k8s-dotnet-todo) repo on GitHub, run installation scripts (included in the sample code) to setup the infrastructure and deploy the webapi to your AWS Account. We will review and test the application, and finally cleanup the resources (basically teardown what you provisioned).\n\n#### **1. Clone the sample code from the GitHub location.**\n\n```\$ git clone https://github.com/aws-samples/aws-cdk-k8s-dotnet-todo```\n\nThe git source provided above has a “cdk”, “webapi” and a “cdk8s” folder. “webapi” has the necessary .NET Web API solution. We will use the [AWS CDK](https://aws.amazon.com/cn/cdk/?trk=cndc-detail) commands to build the infrastructure and deploy the webapi into EKS. cdk8s code provided (using Python language) defines our Kubernetes chart which creates a webservice (k8s Service and Deployment).\n\nOnce the code is downloaded, please take a moment to see how CDK provides a simpler implementation for spinning up an infrastructure using C# code. You may use [Visual Studio Code](https://aws.amazon.com/cn/visualstudiocode/) or your favorite choice of IDE to open the folder aws-cdk-k8s-dotnet-todo).\nOpen the file “/aws-cdk-k8s-dotnet-todo/cdk/src/EksCdk/EksCdkStack.cs”. Code below (provided a snippet from the github solution) spins up a VPC for the required Cidr and number of availability zones. Similarly Open the file “/aws-cdk-k8s-dotnet-todo/cdk8/main.py”. Below snippet creates a Kubernetes chart and creates a webservice.\n\nNOTE: Make sure to replace with your AWS account number (where you are trying to deploy/run this application).\n\nmain.py is called by “cdk8s.yaml” when cdk8s synth is invoked (by run_cdk8s.sh“). Windows users may have to change the name to ”main.py“ instead of ”.\\main.py“ in the cdk8s.yaml\n\n```\\n\\n#!/usr/bin/env python\\nfrom constructs import Construct\\nfrom cdk8s import App, Chart\\nfrom imports import k8s\\nfrom webservice import WebService\\nclass MyChart(Chart):\\n def __init__(self, scope: Construct, ns: str):\\n super().__init__(scope, ns)\\n # define resources here\\n WebService(self, 'todo-app', image='<YOUR_ACCOUNT_NUMBER>.dkr.ecr.us-east-1.amazonaws.com/todo-app:latest', replicas=1)\\n```\n\nOpen the file “/aws-cdk-k8s-dotnet-todo/cdk/src/EksCdk/EksCdkStack.cs”. Below snippet creates a Kubernetes chart and creates a webservice.\n\n```\\n\\n// This sample snippet creates the EKS Cluster\\nvar cluster = new Cluster(this, Constants.CLUSTER_ID, new ClusterProps {\\n MastersRole = clusterAdmin,\\n Version = KubernetesVersion.V1_16,\\n KubectlEnabled = true,\\n DefaultCapacity = 0,\\n Vpc = vpc \\n });\\n\\n```\n\n#### **2. Build the CDK source code and deploy to AWS Account.**\n\nScripts provided\n\n```\\nrun_infra.sh\\nrun_cdks.sh\\ncleanup.sh -NOTE. This will clean up the entire infrastructure. This is needed only when we need to cleanup/destroy the infrastructure created by this blog\\n```\nProvided “run_infra.sh” script/bash file as part of the code base folder, Make sure to replace with your AWS account number (where you are trying to deploy/run this application). This will create the CDK infrastructure and pushes the WebAPI into the ECR. Additionally the script registers the kube update config for the newly created cluster.\n\nIf you would like to perform these steps you can do these manual steps as below\n\n**Step 1**: Steps to build CDK\n\n```\\n- \$ cd aws-cdk-k8s-dotnet-todo\\\\cdk\\n- \$ dotnet build src\\n- \$ cdk synth\\n- \$ cdk bootstrap\\n- \$ cdk deploy --require-approval never\\n```\n\n\nThe above CLI will produce output similar to below. Copy and execute this in the command line. This will update your kube config to connect to the EKS control plane.\n\nBelow provided below is a sample only:\n\nEksCdkStack.cdkeksConfigCommand415D5239 = aws eks update-kubeconfig –name cdkeksDB67CD5C-34ca1ef8aef7463c80c3517cc12737da –region \$REGION —role-arn arn:aws:iam::\$ACCOUNT_NUMBER:role/EksCdkStack-AdminRole38563C57-57FLB39DWVJR\n\n**Step 2**:Steps to Build and push WebAPI into ECR (todo-app ECR repository created as part of above CDK infrastructure)\n\n```\\n\$ cd aws-cdk-k8s-dotnet-todo\\\\cdk\\n\$ dotnet build\\n\$ aws ecr get-login-password --region \$REGION | docker login --username AWS --password-stdin \$ACCOUNT_NUMBER.dkr.ecr.\$REGION.amazonaws.com\\n\$ docker build -t todo-app .\\n\$ docker tag todo-app:latest \$ACCOUNT_NUMBER.dkr.ecr.\$REGION.amazonaws.com/todo-app:latest\\n\$ docker push \$ACCOUNT_NUMBER.dkr.ecr.\$REGION.amazonaws.com/todo-app:latest\\n```\nMake sure to update your region and account number above\n\n**Step 3**: Steps to create Kubernetes service and pods using cdk8s\n\n```\\n\$ cd aws-cdk-k8s-dotnet-todo\\\\cdk8s\\n\$ pip install pipenv\\n\$ cdk8s import\\n\$ pipenv install\\n\$ pipenv run cdk8s synth\\n\$ kubectl apply -f dist/cdk8s.k8s.yaml\\n```\nAfter this is run, review the list/cdk8s.k8s.yaml. cdk8s created k8s yaml that is needed for deploying, loading the image from the ECR. A sample is provided below.\n\nIn this case, the generated yaml has a Kubernetes service & a deployment.\n\n```\\napiVersion: v1\\nkind: Service\\nmetadata:\\n name: cdk8s-todo-app-service-4b26805b\\n....\\n---\\napiVersion: apps/v1\\nkind: Deployment\\nmetadata:\\n...\\n spec:\\n containers:\\n - image: REDACTED.dkr.ecr.us-east-1.amazonaws.com/todo-app:latest\\n name: app\\n ports:\\n - containerPort: 8080\\n```\n\nOnce the Kubernetes objects are created, you can see the created pods and services like below. NOTE This could take sometime to start the ELB cluster with the deployment\n\n```\\n\$ kubectl get pods\\n\$ kubectl get services\\n```\n\n#### **3. Review and Test: Stack Verification**\n\n\n\nThe .NET code provided(cdk/src/EksCdk/Program.cs) creates the EksCdkStack as coded. Based on the name provided, a CloudFormation stack is built. You will be able to see this new stack in AWS Console > CloudFormation.\n\nStack creation creates close to 44 resources within a new VPC. Some of them are provided here below for your reference.\n```\\nAWS::EC2::EIP | eks-vpc/PublicSubnet2/EIP AWS::EC2::VPC | eks-vpc AWS::EC2::InternetGateway | eks-vpc/IGW AWS::EC2::VPCGatewayAttachment | eks-vpc/VPCGW AWS::EC2::Subnet | eks-vpc/PrivateSubnet1/Subnet AWS::EC2::Subnet | eks-vpc/PublicSubnet2/Subnet AWS::EC2::Subnet | eks-vpc/PublicSubnet1/Subnet AWS::EC2::SecurityGroup | cdk-eks/ControlPlaneSecurityGroup AWS::RDS::DBCluster | Database AWS::EC2::SecurityGroup | db-sg AWS::RDS::DBInstance | Database/Instance1 AWS::RDS::DBInstance | Database/Instance2\\n```\nAt the end of this step, you will create the [Amazon Aurora](https://aws.amazon.com/cn/rds/aurora/?trk=cndc-detail) DB table and the EKS Cluster exposed with a Classic LoadBalancer where the .NET Core Web API is deployed & exposed to the outside world. The output of the stack returns the following:\n\n- HealthCheckUrl – [https://your_lb_url/api/values](https://lb_url/api/values)\n- Web ApiUrl – [https://your_lb_url/api/todo](https://your_lb_url/api/todo)\n\n![image.png](https://dev-media.amazoncloud.cn/896490ad60be4850b63448b9b3ad4316_image.png)\n\nSample screenshot shows an api/todo (PUT) operation. Similarly you will be able to do GET operation to retrieve todos.\n\nOnce the above CloudFormation stack is created successfully, take a moment to identify the major components. Here is the infrastructure you’d have created —\n\n- Infrastructure containing VPC, Public & Private Subnet, Route Tables, Internet Gateway, NAT Gateway, Public Load Balancer, EKS Cluster.\n- Other AWS Services – ECR, [Amazon Aurora](https://aws.amazon.com/cn/rds/aurora/?trk=cndc-detail) Database Serverless, Systems Manager, CloudWatch Logs.\n\nUsing CDK constructs, we have built the above infrastructure and integrated the solution with a Public Load Balancer. The output of this stack will give the API URLs for health check and API validation. As you notice by defining the solution using CDK, you were able to:\n\n- Use object-oriented techniques to create a model of your system\n- Organize your project into logical modules\n- Code completion within your IDE\n\nUsing cdk8s chart, were able to generate the needed Kubernetes deployment and service yaml. The generated yaml is applied to the EKS Cluster and exposed using the classic load balancer.\n\nLet’s test the TODO API using any REST API tools, like Postman, Chrome extension ARC or RestMan.\n\n- GET – Open browser and you can hit the Web ApiUrl to see the data.\n\t - [https://your_lb_url/api/todo](https://your_lb_url/api/todo)\n- POST – Create a sample –\n\nSet Headers as “Content-type” & “application/json”\nSample request:\n```\\n{\\n\\"Task\\": \\"Deploying WebAPI in K8s\\",\\n\\"Status\\": \\"WIP\\"\\n}\\n```\n#### **Troubleshooting**\n\n- Issues with running the installation/shell script\n\t- Windows users – Shell scripts by default opens in a new window and closes once done. To see the execution you can paste the script contents in a windows CMD and shall execute sequentially\n\t- If you are deploying through the provided installation/cleanup scripts, make sure to have “chmod +x .sh” or “chmod +777 .sh” (Elevate the execution permission of the scripts)\n\t- Linux Users – Permission issues could arise if you are not running as root user. you may have to “sudo su“ .\n- Error retrieving pods/services/kubectl\n\t - Make sure to update your kube config (This is an output from “cdk” deploy in “run_infra.sh”)\n\t\t - aws eks update-kubeconfig —name\n\t\t- Make sure to review your “~/.kube/config”\n\t\t - [https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html](https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html)\n- Check if local Docker is running.\n- If you get unAuthorized error – kubectl get pods error: You must be logged in to the server (Unauthorized)\n\n\n```\\nhttps://aws.amazon.com/premiumsupport/knowledge-center/eks-api-server-unauthorized-error/\\n```\n\n- Redeployment. If you are trying to remove and reinstall manually,\n\t- Make sure to delete CDK staging directory if you are trying to delete and reinstall the stack. Your directory could be like below cdktoolkit-stagingbucket-guid\n\t- Make sure to delete the SSM parameter “/Database/Config/AuroraConnectionString”\n- Where can i see the load balancer\n\t- \$ kubectl get svc. – This command can provide the LB url\\n\\t- Optionally in AWS Console > EC2 > LoadBalancer\\n- My application is not loading or running when I hit the LB url\\n\\t- Check if the instances are still registering or in healthy state in AWS Console > EC2 > Load Balancer > Select your load balancer > Instances > Check status.\\n\\t \\t- Some of the status you might see are “In Service”, “Out Of Service”, “Registration in progress” etc.,\\n\\t- This example uses Aurora Serverless Database. The DB may take time to initialize for the first time\\n\\t\\t- Check if AWS Console > RDS > “eks-cdk-aurora-database” is running\\n\\t\\t- Select “Query Editor” select the database, enter the credentials. This is provided in SSM “Database/Config/AuroraConnectionString”\\n\\t\\t- You may provide a SQL query like below to validate – “select * from ToDos”\\n\\t- Check if the pods are running\\n\\t\\t- kubectl get pods\\n\\t\\t- kubectl describe pod\\n\\t\\t- kubectl exec -t -i bash\\n- My CDK8s deployment failed\\n\\t- Make sure you have the prerequisites versions. ex: pipenv, python, kubectl\\n\\t- Check your kubectl pods, services (“ex: kubectl get pods, kubectl get src”) to make sure you are able to connect and view the deployment\\n\\t- kube config issues – Open AWS Console> CloudFormation> EksCdkStack > Output. Select the aws update kubeconfig command from the console and run that in your command line (note this is done automatically by the installation run_infra script)\\n\\t- Windows users check for your reference of “main.py” in cdk8s.yaml (within “cdk8s” folder). This should be “main.py” instead of “./main.py”\\n\\t\\n```\\nlanguage: python app: pipenv run ./main.py imports: - k8s\\n```\\n\\n#### **Pricing**\\n\\n- EKS – [https://aws.amazon.com/eks/pricing/](https://aws.amazon.com/cn/eks/pricing/)\\n- Aurora RDS – [https://aws.amazon.com/rds/aurora/pricing/](https://aws.amazon.com/cn/rds/aurora/pricing/)\\n- Classic LoadBalancer – [https://aws.amazon.com/elasticloadbalancing/pricing/](https://aws.amazon.com/cn/elasticloadbalancing/pricing/)\\n- EC2 – [https://aws.amazon.com/ec2/pricing/](https://aws.amazon.com/cn/ec2/pricing/)\\n\\n#### **4. Code Cleanup**\\n\\nRun the “cleanup.sh” to delete the created infrastructure\\n\\nIf you would like to do this manually, make sure the following resources are deleted before performing the delete/destroy:\\n\\n- Stop the Kubernetes services, deployment, pods\\n- Contents of the S3 files are deleted.\\n- In AWS Console, look for “CDKToolkit” stack\\n- Go to “Resources” tab, select the s3 bucket\\n- Select all the contents & delete the contents manually\\n\\ncleanup can be done using the below CLI commands as well:\\n\\n```\\n- \$ cd aws-cdk-k8s-dotnet-todo\\cdk8s\n- \$ kubectl delete pods --all\\n- \$ kubectl delete services --all\n- \$ aws ecr delete-repository --repository-name todo-app --force\\n- \$ cdk destroy --force\n- \$ aws cloudformation delete-stack --stack-name CDKToolkit\\n```\\n\\n#### **Conclusion**\\n\\nAs you can see, we were able to deploy an ASP.NET Core Web API application that uses various AWS Services. In this post we went through the steps and approach for deploying Microsoft .NET Core application code as containers with infrastructure as code using CDK and deploy the Kubernetes services, pods using cdk8s. cdk8s+ is a library built on top of cdk8s. It is a rich, intent-based class library for using the core Kubernetes API. It includes hand crafted constructs that map to native Kubernetes objects, and expose a richer API with reduced complexity. You can check out more cdk8s [examples](https://github.com/awslabs/cdk8s/blob/master/examples/README.md), [patterns](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/deploy-kubernetes-resources-and-packages-using-amazon-eks-and-a-helm-chart-repository-in-amazon-s3.html), [AWS EKS Architecture](https://aws.amazon.com/cn/quickstart/architecture/amazon-eks/), and [intent-driven APIs](https://aws.amazon.com/cn/blogs/containers/introducing-cdk8s-intent-driven-apis-for-kubernetes-objects/) using [cdk8s+ for](https://github.com/cdk8s-team/cdk8s/tree/master/packages/cdk8s-plus) Kubernetes objects.\\n\\nWe encourage you to try this example and see for yourself how this overall application design works within AWS. Then, it will just be a matter of replacing your current applications (Web API, MVC, or other Microsoft .NET core application), package them as Docker containers and let the Amazon EKS manage the application efficiently.\\n\\nIf you have any questions/feedback about this blog please provide your comments below!\\n\\n#### **References**\\n\\n- [CDK for Kubernetes](https://github.com/cdk8s-team/cdk8s/blob/master/README.md#getting-started)\\n- [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/v2/guide/home.html)\\n- [AWS CDK .NET API Reference](https://docs.aws.amazon.com/cdk/api/v1/dotnet/api/index.html)\\n- [Microsoft .Net Core](https://dotnet.microsoft.com/en-us/download/dotnet/2.2)\\n- [Windows on AWS](https://aws.amazon.com/cn/windows/?blog-posts-content-windows.sort-by=item.additionalFields.createdDate&blog-posts-content-windows.sort-order=desc)\\n- [Docker Containers](https://www.docker.com/resources/what-container/)\\n- [.NET WebAPI with AWS CDK Example](https://aws.amazon.com/cn/blogs/developer/developing-a-microsoft-net-core-web-api-application-with-aurora-database-using-aws-cdk/)\\n\\n#### **About the Authors**\\n![image.png](https://dev-media.amazoncloud.cn/8d7e8d23bd7b4c7cac0163d99a1c7d0a_image.png)\\n\\n\\n\\n\\n\\n\\n\\nSivasubramanian Ramani (Siva Ramani) is a Sr Cloud Application Architect at AWS. His expertise is in application optimization, serverless solutions and using Microsoft application workloads with Amazon .\\n\\n![image.png](https://dev-media.amazoncloud.cn/686aaa7b9b6a445d91538b166cdef715_image.png)\\nNaveen Balaraman is a Cloud Application Architect at Amazon Web Services. He is passionate about Containers, serverless Applications, Architecting Microservices and helping customers leverage the power of AWS cloud.\\n","render":"<p>In this blog, we will leverage the development capabilities of the <a href=\\"https://cdk8s.io/\\" target=\\"_blank\\">CDK for Kubernetes</a> framework also known as cdk8s along with the <a href=\\"https://docs.aws.amazon.com/cdk/v2/guide/home.html\\" target=\\"_blank\\">AWS Cloud Development Kit (AWS CDK)</a> framework to provision infrastructure through AWS CloudFormation.</p>\\n<p>cdk8s allows us to define Kubernetes apps and components using familiar languages. cdk8s is an open-source software development framework for defining Kubernetes applications and reusable abstractions using familiar programming languages and rich object-oriented APIs. cdk8s apps synthesize into standard Kubernetes manifests which can be applied to any Kubernetes cluster. cdk8s lets you define applications using Typescript, JavaScript, and Python. In this blog we will use Python.</p>\\n<p>The AWS CDK is an open source software development framework to model and provision your cloud application resources using familiar programming languages, including TypeScript, JavaScript, Python, C# and Java.</p>\\n<p>For the solution in this blog, we will use C# for the infrastructure code. Completing this walkthrough successfully would take you about couple hours (including installing pre-requisites etc.), so plan accordingly.</p>\\n<p>Let’s get started!</p>\\n<p>At a high-level, we will:</p>\\n<ol>\\n<li>Create a simple TODO, Microsoft .NET Core Web API application and integrate with Amazon Aurora Serverless database, AWS SDK Package like SSM into it.</li>\\n<li>Use AWS CDK to define the Infrastructure resources required for the application.</li>\\n<li>Use cdk8s to define, deploy and run the application within the created Kubernetes cluster (Created above by CDK)</li>\\n<li>Use <a href=\\"https://aws.amazon.com/cn/eks/\\" target=\\"_blank\\">Elastic Kubernetes Service</a>, <a href=\\"https://aws.amazon.com/cn/ecr/\\" target=\\"_blank\\">Elastic Container Registry (ECR)</a>, <a href=\\"https://aws.amazon.com/cn/systems-manager/\\" target=\\"_blank\\">Amazon Systems Manager (SSM)</a> (maintains the Aurora DB Credentials).</li>\\n<li>Use <a href=\\"https://aws.amazon.com/cn/rds/aurora/\\" target=\\"_blank\\">Amazon Aurora Database (Serverless)</a> as the backend.</li>\\n</ol>\\n<p>Creating the infrastructure described above will result in charges beyond free tier. So, review the pricing section below for service-specific details and make sure to clean up the built infrastructure to avoid any recurring cost.</p>\\n<p><img src=\\"https://dev-media.amazoncloud.cn/03d664378c534ba9a42efefcfc72ac21_image.png\\" alt=\\"image.png\\" /><br />\\ncdk-cdk8s-architecture</p>\\n<p>The <a href=\\"https://github.com/aws-samples/aws-cdk-k8s-dotnet-todo\\" target=\\"_blank\\">Github source code</a> includes a “cdk8s” folder where the .NET application (docker container WebAPI in ECR) will be deployed and run in the Kubernetes cluster. “cdk” folder contains the AWS Cloud Development Kit (CDK) solution (C# .Net Core) to build the infrastructure. This solution constructs the AWS infrastructure where the “webapi” (.NET Core Web api) is packaged, built as an artifact and pushed to AWS ECR. The .NET project sample uses AWS SDK, Mysql data packages to connect to MySQL and interact with Amazon Aurora database. The exposed Web API endpoint makes HTTP calls (GET &amp; POST) to add/retrieve TODOs. The end user can use any http get/put tool like curl or UI tools like Google Chrome ARC Rest Client or POSTMAN to validate the changes.</p>\\n<h4><a id=\\"Overview_of_the_AWS_services_used_in_this_solution_25\\"></a><strong>Overview of the AWS services used in this solution</strong></h4>\\n<ul>\\n<li><a href=\\"https://aws.amazon.com/cn/rds/aurora/\\" target=\\"_blank\\">Amazon Aurora</a>, a MySQL and PostgreSQL-compatible relational database is used as the backend for the purpose of this project.</li>\\n<li><a href=\\"https://aws.amazon.com/cn/eks/\\" target=\\"_blank\\">Amazon Elastic Kubernetes Service</a> is a fully managed Kubernetes service. EKS runs upstream Kubernetes and is certified Kubernetes conformant so you can leverage all benefits of open source tooling from the community. You can also easily migrate any standard Kubernetes application to EKS without needing to refactor your code.In this example we use cdk8s to deploy the K8s services and pods The code is provided as part of the solution.</li>\\n<li><a href=\\"https://aws.amazon.com/cn/ecr/\\" target=\\"_blank\\">Amazon Elastic Container Registry</a>, the AWS provided Docker container registry is used by EKS Managed worker nodes, simplifying the development to production workflow.</li>\\n</ul>\\n<h4><a id=\\"Prerequisites_31\\"></a><strong>Prerequisites</strong></h4>\\n<p>We will use Docker Containers to deploy the Microsoft .NET Web API. The following are required to setup your development environment:</p>\\n<ol>\\n<li><a href=\\"https://www.python.org/downloads/release/python-377/\\" target=\\"_blank\\">Python &gt;=3.7</a></li>\\n<li><a href=\\"https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration.html\\" target=\\"_blank\\">AWS CLI</a></li>\\n<li><a href=\\"https://dotnet.microsoft.com/en-us/download/dotnet/3.1\\" target=\\"_blank\\">NET Core</a>:<br />\\n1.Web API application was built using Microsoft .NET core 3.1<br />\\n2.Please refer Microsoft Documentation for installation.</li>\\n<li><a href=\\"https://www.docker.com/\\" target=\\"_blank\\">Docker</a><br />\\n1.<a href=\\"https://www.docker.com/products/docker-desktop/\\" target=\\"_blank\\">Install Docker</a> based on your OS.<br />\\n2.Make sure the docker daemon is running</li>\\n<li><a href=\\"https://kubernetes.io/docs/tasks/tools/\\" target=\\"_blank\\">Kubectl</a></li>\\n<li><a href=\\"https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#getting_started_install\\" target=\\"_blank\\">AWS CDK &gt;= 1.58.0</a></li>\\n<li><a href=\\"https://github.com/cdk8s-team/cdk8s/blob/master/docs/getting-started/python.md\\" target=\\"_blank\\">AWS cdk8s</a></li>\\n<li>Additionally, we use AWS SDK, MySql data packages for the Microsoft .NET project and have added them as nuget packages to the solution. In this example, we use Mysql data to connect to MySql/Aurora database and also AWS SDK Systems Manager to connect to Amazon Systems Manager.</li>\\n</ol>\\n<h4><a id=\\"The_Solution_48\\"></a><strong>The Solution</strong></h4>\\n<p>To provision the infrastructure (and services) and deploy the application, we will start by cloning the sample code from the <a href=\\"https://github.com/aws-samples/aws-cdk-k8s-dotnet-todo\\" target=\\"_blank\\">aws-samples</a> repo on GitHub, run installation scripts (included in the sample code) to setup the infrastructure and deploy the webapi to your AWS Account. We will review and test the application, and finally cleanup the resources (basically teardown what you provisioned).</p>\\n<h4><a id=\\"1_Clone_the_sample_code_from_the_GitHub_location_52\\"></a><strong>1. Clone the sample code from the GitHub location.</strong></h4>\\n<p><code>\$ git clone https://github.com/aws-samples/aws-cdk-k8s-dotnet-todo</code></p>\n<p>The git source provided above has a “cdk”, “webapi” and a “cdk8s” folder. “webapi” has the necessary .NET Web API solution. We will use the AWS CDK commands to build the infrastructure and deploy the webapi into EKS. cdk8s code provided (using Python language) defines our Kubernetes chart which creates a webservice (k8s Service and Deployment).</p>\n<p>Once the code is downloaded, please take a moment to see how CDK provides a simpler implementation for spinning up an infrastructure using C# code. You may use <a href=\\"https://aws.amazon.com/cn/visualstudiocode/\\" target=\\"_blank\\">Visual Studio Code</a> or your favorite choice of IDE to open the folder aws-cdk-k8s-dotnet-todo).<br />\\nOpen the file “/aws-cdk-k8s-dotnet-todo/cdk/src/EksCdk/EksCdkStack.cs”. Code below (provided a snippet from the github solution) spins up a VPC for the required Cidr and number of availability zones. Similarly Open the file “/aws-cdk-k8s-dotnet-todo/cdk8/main.py”. Below snippet creates a Kubernetes chart and creates a webservice.</p>\n<p>NOTE: Make sure to replace with your AWS account number (where you are trying to deploy/run this application).</p>\n<p>main.py is called by “cdk8s.yaml” when cdk8s synth is invoked (by run_cdk8s.sh“). Windows users may have to change the name to ”main.py“ instead of ”.\\\\main.py“ in the cdk8s.yaml</p>\n<pre><code class=\\"lang-\\">\\n#!/usr/bin/env python\\nfrom constructs import Construct\\nfrom cdk8s import App, Chart\\nfrom imports import k8s\\nfrom webservice import WebService\\nclass MyChart(Chart):\\n def __init__(self, scope: Construct, ns: str):\\n super().__init__(scope, ns)\\n # define resources here\\n WebService(self, 'todo-app', image='&lt;YOUR_ACCOUNT_NUMBER&gt;.dkr.ecr.us-east-1.amazonaws.com/todo-app:latest', replicas=1)\\n</code></pre>\\n<p>Open the file “/aws-cdk-k8s-dotnet-todo/cdk/src/EksCdk/EksCdkStack.cs”. Below snippet creates a Kubernetes chart and creates a webservice.</p>\n<pre><code class=\\"lang-\\">\\n// This sample snippet creates the EKS Cluster\\nvar cluster = new Cluster(this, Constants.CLUSTER_ID, new ClusterProps {\\n MastersRole = clusterAdmin,\\n Version = KubernetesVersion.V1_16,\\n KubectlEnabled = true,\\n DefaultCapacity = 0,\\n Vpc = vpc \\n });\\n\\n</code></pre>\\n<h4><a id=\\"2_Build_the_CDK_source_code_and_deploy_to_AWS_Account_94\\"></a><strong>2. Build the CDK source code and deploy to AWS Account.</strong></h4>\\n<p>Scripts provided</p>\n<pre><code class=\\"lang-\\">run_infra.sh\\nrun_cdks.sh\\ncleanup.sh -NOTE. This will clean up the entire infrastructure. This is needed only when we need to cleanup/destroy the infrastructure created by this blog\\n</code></pre>\\n<p>Provided “run_infra.sh” script/bash file as part of the code base folder, Make sure to replace with your AWS account number (where you are trying to deploy/run this application). This will create the CDK infrastructure and pushes the WebAPI into the ECR. Additionally the script registers the kube update config for the newly created cluster.</p>\n<p>If you would like to perform these steps you can do these manual steps as below</p>\n<p><strong>Step 1</strong>: Steps to build CDK</p>\\n<pre><code class=\\"lang-\\">- \$ cd aws-cdk-k8s-dotnet-todo\\\\cdk\\n- \$ dotnet build src\\n- \$ cdk synth\\n- \$ cdk bootstrap\\n- \$ cdk deploy --require-approval never\\n</code></pre>\\n<p>The above CLI will produce output similar to below. Copy and execute this in the command line. This will update your kube config to connect to the EKS control plane.</p>\n<p>Below provided below is a sample only:</p>\n<p>EksCdkStack.cdkeksConfigCommand415D5239 = aws eks update-kubeconfig –name cdkeksDB67CD5C-34ca1ef8aef7463c80c3517cc12737da –region REGION —role-arn arn:aws:iam::ACCOUNT_NUMBER:role/EksCdkStack-AdminRole38563C57-57FLB39DWVJR</p>\n<p><strong>Step 2</strong>:Steps to Build and push WebAPI into ECR (todo-app ECR repository created as part of above CDK infrastructure)</p>\\n<pre><code class=\\"lang-\\">\$ cd aws-cdk-k8s-dotnet-todo\\\\cdk\\n\$ dotnet build\\n\$ aws ecr get-login-password --region \$REGION | docker login --username AWS --password-stdin \$ACCOUNT_NUMBER.dkr.ecr.\$REGION.amazonaws.com\\n\$ docker build -t todo-app .\\n\$ docker tag todo-app:latest \$ACCOUNT_NUMBER.dkr.ecr.\$REGION.amazonaws.com/todo-app:latest\\n\$ docker push \$ACCOUNT_NUMBER.dkr.ecr.\$REGION.amazonaws.com/todo-app:latest\\n</code></pre>\\n<p>Make sure to update your region and account number above</p>\n<p><strong>Step 3</strong>: Steps to create Kubernetes service and pods using cdk8s</p>\\n<pre><code class=\\"lang-\\">\$ cd aws-cdk-k8s-dotnet-todo\\\\cdk8s\\n\$ pip install pipenv\\n\$ cdk8s import\\n\$ pipenv install\\n\$ pipenv run cdk8s synth\\n\$ kubectl apply -f dist/cdk8s.k8s.yaml\\n</code></pre>\\n<p>After this is run, review the list/cdk8s.k8s.yaml. cdk8s created k8s yaml that is needed for deploying, loading the image from the ECR. A sample is provided below.</p>\n<p>In this case, the generated yaml has a Kubernetes service &amp; a deployment.</p>\n<pre><code class=\\"lang-\\">apiVersion: v1\\nkind: Service\\nmetadata:\\n name: cdk8s-todo-app-service-4b26805b\\n....\\n---\\napiVersion: apps/v1\\nkind: Deployment\\nmetadata:\\n...\\n spec:\\n containers:\\n - image: REDACTED.dkr.ecr.us-east-1.amazonaws.com/todo-app:latest\\n name: app\\n ports:\\n - containerPort: 8080\\n</code></pre>\\n<p>Once the Kubernetes objects are created, you can see the created pods and services like below. NOTE This could take sometime to start the ELB cluster with the deployment</p>\n<pre><code class=\\"lang-\\">\$ kubectl get pods\\n\$ kubectl get services\\n</code></pre>\\n<h4><a id=\\"3_Review_and_Test_Stack_Verification_176\\"></a><strong>3. Review and Test: Stack Verification</strong></h4>\\n<p>The .NET code provided(cdk/src/EksCdk/Program.cs) creates the EksCdkStack as coded. Based on the name provided, a CloudFormation stack is built. You will be able to see this new stack in AWS Console &gt; CloudFormation.</p>\n<p>Stack creation creates close to 44 resources within a new VPC. Some of them are provided here below for your reference.</p>\n<pre><code class=\\"lang-\\">AWS::EC2::EIP | eks-vpc/PublicSubnet2/EIP AWS::EC2::VPC | eks-vpc AWS::EC2::InternetGateway | eks-vpc/IGW AWS::EC2::VPCGatewayAttachment | eks-vpc/VPCGW AWS::EC2::Subnet | eks-vpc/PrivateSubnet1/Subnet AWS::EC2::Subnet | eks-vpc/PublicSubnet2/Subnet AWS::EC2::Subnet | eks-vpc/PublicSubnet1/Subnet AWS::EC2::SecurityGroup | cdk-eks/ControlPlaneSecurityGroup AWS::RDS::DBCluster | Database AWS::EC2::SecurityGroup | db-sg AWS::RDS::DBInstance | Database/Instance1 AWS::RDS::DBInstance | Database/Instance2\\n</code></pre>\\n<p>At the end of this step, you will create the Amazon Aurora DB table and the EKS Cluster exposed with a Classic LoadBalancer where the .NET Core Web API is deployed &amp; exposed to the outside world. The output of the stack returns the following:</p>\n<ul>\\n<li>HealthCheckUrl – <a href=\\"https://lb_url/api/values\\" target=\\"_blank\\">https://your_lb_url/api/values</a></li>\\n<li>Web ApiUrl – <a href=\\"https://your_lb_url/api/todo\\" target=\\"_blank\\">https://your_lb_url/api/todo</a></li>\\n</ul>\n<p><img src=\\"https://dev-media.amazoncloud.cn/896490ad60be4850b63448b9b3ad4316_image.png\\" alt=\\"image.png\\" /></p>\n<p>Sample screenshot shows an api/todo (PUT) operation. Similarly you will be able to do GET operation to retrieve todos.</p>\n<p>Once the above CloudFormation stack is created successfully, take a moment to identify the major components. Here is the infrastructure you’d have created —</p>\n<ul>\\n<li>Infrastructure containing VPC, Public &amp; Private Subnet, Route Tables, Internet Gateway, NAT Gateway, Public Load Balancer, EKS Cluster.</li>\n<li>Other AWS Services – ECR, Amazon Aurora Database Serverless, Systems Manager, CloudWatch Logs.</li>\n</ul>\\n<p>Using CDK constructs, we have built the above infrastructure and integrated the solution with a Public Load Balancer. The output of this stack will give the API URLs for health check and API validation. As you notice by defining the solution using CDK, you were able to:</p>\n<ul>\\n<li>Use object-oriented techniques to create a model of your system</li>\n<li>Organize your project into logical modules</li>\n<li>Code completion within your IDE</li>\n</ul>\\n<p>Using cdk8s chart, were able to generate the needed Kubernetes deployment and service yaml. The generated yaml is applied to the EKS Cluster and exposed using the classic load balancer.</p>\n<p>Let’s test the TODO API using any REST API tools, like Postman, Chrome extension ARC or RestMan.</p>\n<ul>\\n<li>GET – Open browser and you can hit the Web ApiUrl to see the data.\\n<ul>\\n<li><a href=\\"https://your_lb_url/api/todo\\" target=\\"_blank\\">https://your_lb_url/api/todo</a></li>\\n</ul>\n</li>\\n<li>POST – Create a sample –</li>\n</ul>\\n<p>Set Headers as “Content-type” &amp; “application/json”<br />\\nSample request:</p>\n<pre><code class=\\"lang-\\">{\\n&quot;Task&quot;: &quot;Deploying WebAPI in K8s&quot;,\\n&quot;Status&quot;: &quot;WIP&quot;\\n}\\n</code></pre>\\n<h4><a id=\\"Troubleshooting_222\\"></a><strong>Troubleshooting</strong></h4>\\n<ul>\\n<li>Issues with running the installation/shell script\\n<ul>\\n<li>Windows users – Shell scripts by default opens in a new window and closes once done. To see the execution you can paste the script contents in a windows CMD and shall execute sequentially</li>\n<li>If you are deploying through the provided installation/cleanup scripts, make sure to have “chmod +x .sh” or “chmod +777 .sh” (Elevate the execution permission of the scripts)</li>\n<li>Linux Users – Permission issues could arise if you are not running as root user. you may have to “sudo su“ .</li>\n</ul>\\n</li>\n<li>Error retrieving pods/services/kubectl\\n<ul>\\n<li>Make sure to update your kube config (This is an output from “cdk” deploy in “run_infra.sh”)\\n<ul>\\n<li>aws eks update-kubeconfig —name</li>\n<li>Make sure to review your “~/.kube/config”</li>\n<li><a href=\\"https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html\\" target=\\"_blank\\">https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html</a></li>\\n</ul>\n</li>\\n</ul>\n</li>\\n<li>Check if local Docker is running.</li>\n<li>If you get unAuthorized error – kubectl get pods error: You must be logged in to the server (Unauthorized)</li>\n</ul>\\n<pre><code class=\\"lang-\\">https://aws.amazon.com/premiumsupport/knowledge-center/eks-api-server-unauthorized-error/\\n</code></pre>\\n<ul>\\n<li>Redeployment. If you are trying to remove and reinstall manually,\\n<ul>\\n<li>Make sure to delete CDK staging directory if you are trying to delete and reinstall the stack. Your directory could be like below cdktoolkit-stagingbucket-guid</li>\n<li>Make sure to delete the SSM parameter “/Database/Config/AuroraConnectionString”</li>\n</ul>\\n</li>\n<li>Where can i see the load balancer\\n<ul>\\n<li>\$ kubectl get svc. – This command can provide the LB url</li>\n<li>Optionally in AWS Console &gt; EC2 &gt; LoadBalancer</li>\n</ul>\\n</li>\n<li>My application is not loading or running when I hit the LB url\\n<ul>\\n<li>Check if the instances are still registering or in healthy state in AWS Console &gt; EC2 &gt; Load Balancer &gt; Select your load balancer &gt; Instances &gt; Check status.\\n<ul>\\n<li>Some of the status you might see are “In Service”, “Out Of Service”, “Registration in progress” etc.,</li>\n</ul>\\n</li>\n<li>This example uses Aurora Serverless Database. The DB may take time to initialize for the first time\\n<ul>\\n<li>Check if AWS Console &gt; RDS &gt; “eks-cdk-aurora-database” is running</li>\n<li>Select “Query Editor” select the database, enter the credentials. This is provided in SSM “Database/Config/AuroraConnectionString”</li>\n<li>You may provide a SQL query like below to validate – “select * from ToDos”</li>\n</ul>\\n</li>\n<li>Check if the pods are running\\n<ul>\\n<li>kubectl get pods</li>\n<li>kubectl describe pod</li>\n<li>kubectl exec -t -i bash</li>\n</ul>\\n</li>\n</ul>\\n</li>\n<li>My CDK8s deployment failed\\n<ul>\\n<li>Make sure you have the prerequisites versions. ex: pipenv, python, kubectl</li>\n<li>Check your kubectl pods, services (“ex: kubectl get pods, kubectl get src”) to make sure you are able to connect and view the deployment</li>\n<li>kube config issues – Open AWS Console&gt; CloudFormation&gt; EksCdkStack &gt; Output. Select the aws update kubeconfig command from the console and run that in your command line (note this is done automatically by the installation run_infra script)</li>\n<li>Windows users check for your reference of “main.py” in cdk8s.yaml (within “cdk8s” folder). This should be “main.py” instead of “./main.py”</li>\n</ul>\\n</li>\n</ul>\\n<pre><code class=\\"lang-\\">language: python app: pipenv run ./main.py imports: - k8s\\n</code></pre>\\n<h4><a id=\\"Pricing_268\\"></a><strong>Pricing</strong></h4>\\n<ul>\\n<li>EKS – <a href=\\"https://aws.amazon.com/cn/eks/pricing/\\" target=\\"_blank\\">https://aws.amazon.com/eks/pricing/</a></li>\\n<li>Aurora RDS – <a href=\\"https://aws.amazon.com/cn/rds/aurora/pricing/\\" target=\\"_blank\\">https://aws.amazon.com/rds/aurora/pricing/</a></li>\\n<li>Classic LoadBalancer – <a href=\\"https://aws.amazon.com/cn/elasticloadbalancing/pricing/\\" target=\\"_blank\\">https://aws.amazon.com/elasticloadbalancing/pricing/</a></li>\\n<li>EC2 – <a href=\\"https://aws.amazon.com/cn/ec2/pricing/\\" target=\\"_blank\\">https://aws.amazon.com/ec2/pricing/</a></li>\\n</ul>\n<h4><a id=\\"4_Code_Cleanup_275\\"></a><strong>4. Code Cleanup</strong></h4>\\n<p>Run the “cleanup.sh” to delete the created infrastructure</p>\n<p>If you would like to do this manually, make sure the following resources are deleted before performing the delete/destroy:</p>\n<ul>\\n<li>Stop the Kubernetes services, deployment, pods</li>\n<li>Contents of the S3 files are deleted.</li>\n<li>In AWS Console, look for “CDKToolkit” stack</li>\n<li>Go to “Resources” tab, select the s3 bucket</li>\n<li>Select all the contents &amp; delete the contents manually</li>\n</ul>\\n<p>cleanup can be done using the below CLI commands as well:</p>\n<pre><code class=\\"lang-\\">- \$ cd aws-cdk-k8s-dotnet-todo\\\\cdk8s\\n- \$ kubectl delete pods --all\\n- \$ kubectl delete services --all\\n- \$ aws ecr delete-repository --repository-name todo-app --force\\n- \$ cdk destroy --force\\n- \$ aws cloudformation delete-stack --stack-name CDKToolkit\\n</code></pre>\\n<h4><a id=\\"Conclusion_298\\"></a><strong>Conclusion</strong></h4>\\n<p>As you can see, we were able to deploy an ASP.NET Core Web API application that uses various AWS Services. In this post we went through the steps and approach for deploying Microsoft .NET Core application code as containers with infrastructure as code using CDK and deploy the Kubernetes services, pods using cdk8s. cdk8s+ is a library built on top of cdk8s. It is a rich, intent-based class library for using the core Kubernetes API. It includes hand crafted constructs that map to native Kubernetes objects, and expose a richer API with reduced complexity. You can check out more cdk8s <a href=\\"https://github.com/awslabs/cdk8s/blob/master/examples/README.md\\" target=\\"_blank\\">examples</a>, <a href=\\"https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/deploy-kubernetes-resources-and-packages-using-amazon-eks-and-a-helm-chart-repository-in-amazon-s3.html\\" target=\\"_blank\\">patterns</a>, <a href=\\"https://aws.amazon.com/cn/quickstart/architecture/amazon-eks/\\" target=\\"_blank\\">AWS EKS Architecture</a>, and <a href=\\"https://aws.amazon.com/cn/blogs/containers/introducing-cdk8s-intent-driven-apis-for-kubernetes-objects/\\" target=\\"_blank\\">intent-driven APIs</a> using <a href=\\"https://github.com/cdk8s-team/cdk8s/tree/master/packages/cdk8s-plus\\" target=\\"_blank\\">cdk8s+ for</a> Kubernetes objects.</p>\\n<p>We encourage you to try this example and see for yourself how this overall application design works within AWS. Then, it will just be a matter of replacing your current applications (Web API, MVC, or other Microsoft .NET core application), package them as Docker containers and let the Amazon EKS manage the application efficiently.</p>\n<p>If you have any questions/feedback about this blog please provide your comments below!</p>\n<h4><a id=\\"References_306\\"></a><strong>References</strong></h4>\\n<ul>\\n<li><a href=\\"https://github.com/cdk8s-team/cdk8s/blob/master/README.md#getting-started\\" target=\\"_blank\\">CDK for Kubernetes</a></li>\\n<li><a href=\\"https://docs.aws.amazon.com/cdk/v2/guide/home.html\\" target=\\"_blank\\">AWS Cloud Development Kit (CDK)</a></li>\\n<li><a href=\\"https://docs.aws.amazon.com/cdk/api/v1/dotnet/api/index.html\\" target=\\"_blank\\">AWS CDK .NET API Reference</a></li>\\n<li><a href=\\"https://dotnet.microsoft.com/en-us/download/dotnet/2.2\\" target=\\"_blank\\">Microsoft .Net Core</a></li>\\n<li><a href=\\"https://aws.amazon.com/cn/windows/?blog-posts-content-windows.sort-by=item.additionalFields.createdDate&amp;blog-posts-content-windows.sort-order=desc\\" target=\\"_blank\\">Windows on AWS</a></li>\\n<li><a href=\\"https://www.docker.com/resources/what-container/\\" target=\\"_blank\\">Docker Containers</a></li>\\n<li><a href=\\"https://aws.amazon.com/cn/blogs/developer/developing-a-microsoft-net-core-web-api-application-with-aurora-database-using-aws-cdk/\\" target=\\"_blank\\">.NET WebAPI with AWS CDK Example</a></li>\\n</ul>\n<h4><a id=\\"About_the_Authors_316\\"></a><strong>About the Authors</strong></h4>\\n<p><img src=\\"https://dev-media.amazoncloud.cn/8d7e8d23bd7b4c7cac0163d99a1c7d0a_image.png\\" alt=\\"image.png\\" /></p>\n<p>Sivasubramanian Ramani (Siva Ramani) is a Sr Cloud Application Architect at AWS. His expertise is in application optimization, serverless solutions and using Microsoft application workloads with Amazon .</p>\n<p><img src=\\"https://dev-media.amazoncloud.cn/686aaa7b9b6a445d91538b166cdef715_image.png\\" alt=\\"image.png\\" /><br />\\nNaveen Balaraman is a Cloud Application Architect at Amazon Web Services. He is passionate about Containers, serverless Applications, Architecting Microservices and helping customers leverage the power of AWS cloud.</p>\n"}
目录
亚马逊云科技解决方案 基于行业客户应用场景及技术领域的解决方案
联系亚马逊云科技专家
亚马逊云科技解决方案
基于行业客户应用场景及技术领域的解决方案
联系专家
0
目录
关闭