This topic describes how to create an ASP.NET Core application by using an orchestration
template. In this topic, a Deployment and a Service are created to run the ASP.NET
Core application. The Deployment provisions pods for the application and the Service
allows access to backend pods.
The resource objects required to run an ASP.NET Core application are created by using
an orchestration template in the Container Service for Kubernetes (ACK) console. You
can provision these resource objects to run the application by using mechanisms such
as the label selector.
On the Clusters page, click the name of a cluster or click Details in the Actions column. The details page of the cluster appears.
In the left-side navigation pane, click Workload.
On the Workload page, click the Deployments tab. In the upper-right corner of the Deployments tab, click Create from Template.
Set the parameters and click Create.
Namespace: Select the namespace to which the resource object belongs. The default namespace
is default. Except for underlying computing resources such as nodes and persistent
volumes (PVs), most resources are limited by namespaces.
Sample Template: ACK provides YAML templates of various resource types. This simplifies the deployment
of resource objects. You can also create a custom template based on YAML syntax to
describe the resource that you want to define.
Add Deployment: This feature allows you to define a YAML template.
Use Existing Template: You can import an existing template to the configuration page.
Based on an orchestration template provided by ACK, the following sample template
can be used to create a Deployment for an ASP.NET Core application.
Note ACK supports YAML syntax. If you want to create multiple resource objects in a template,
you can use the --- symbol to separate the resource objects.
Click Create. A message that indicates the deployment status appears. After the Deployment is
deployed, you can view the Deployment on the Deployments tab.
You can access the ASP.NET Core application.
In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster where the ASP.NET Core application is deployed and choose
More > Dashboard in the Actions column.
In the left-side navigation pane, select the namespace where the application is deployed
from the Namespace drop-down list.
In the left-side navigation pane, click Discovery and Load Balancing and click Services. On the Services page, you can find that a Service named aspnet-svc is deployed and is open to external access through an external endpoint.
You can click the external endpoint of the aspnet-svc Service to access the ASP.NET Core application.
What to do next
In the left-side navigation page of the details page of the cluster, click Services to view the Service that is created for the ASP.NET Core application.