Build Application with Manifest
There are different solutions for deploying the application on the Arvancloud Container platform, which you can choose according to your needs. If you have already used Kubernetes and written the necessary Manifests for different parts of your application, the "Insert Manifest" method will help you implement and run your applications directly.
Enter Arvancloud's user panel and the "New Application" section in the cloud container menu. Then select "Insert Manifest" from among the ways to build the application.
Insert Manifest
The Kubernetes manifest is a YAML file in which various components such as Deployment, Replica Set, Service, and ... are defined. If you have already written a manifest for your application, you can paste it into this section and click "Start" to start the process of building the application.
An important point that must be observed in the manifests is to determine the consumption resources for each container. This should be specified in the Deployment and the Containers section. If the amount of resources is not specified in the manifest, by default 1 CPU core and 2 GB of RAM are selected for it. You should also consider the ratio of 1 to 2 processor and RAM in the specified value.
Make sure that the values of Limits and Requests must be the same.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
labels:
app: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
resources:
limits:
cpu: "0.5"
ephemeral-storage: 1G
memory: 1G
requests:
cpu: "0.5"
ephemeral-storage: 1G
memory: 1G
---
apiVersion: v1
kind: Service
metadata:
name: nginx-svc
spec:
selector:
app: nginx
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-ingress
spec:
ingressClassName: nginx
rules:
- host: [your_domain]
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-svc
port:
name: http
You can write your manifests in YAML and separate them with a "---" separator at the end of each file and deploy them all at once to the cloud container.
Also, note that to use 2nd or 3rd generation Arvancloud processors, you must specify Affinity in your manifest as in the example below.
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/cloud-container-g2
operator: In
values:
- "true"
Create Application
After inserting the manifest, you are only two steps away from building the application.
First Step: Project Details
First, you need to choose the data center and infrastructure to host your application. Currently, two regions, Bammad and Shahriar, are available on the Kubernetes platform. Then choose one of the existing projects to deploy this application or create a new one.
At the end, click on the "Continue" button.
Second Step: Final Review
In the last step, you just need to select the CPU generation of the application and check the bill.
On this page, you can check the cost estimate hourly, daily, weekly, or monthly and separately for each component. You can also download and save this invoice.
Whenever you shut down or delete your app, you won't be charged for CPU, RAM, or temporary storage.
At the end, click on the "Create" button to create your application.
Application Status
Once the build process is complete, your app will be available in the Applications section.
Also, for more details, you can access the events, log, and console of the application through the quick access section until the end of the app installation and activation.
From now on, you can manage your app settings by clicking on the app.