Skip to main content

Creating an Application with a Manifest

There are different ways to deploy an application on the Arvancloud Cloud Container, and you can choose one based on your needs. If you've used Kubernetes before and have written the necessary manifests for the different parts of your application, the Insert Manifest method helps you deploy and run your applications directly.

Log in to the Arvancloud panel and go to Create Application in the Cloud Container menu. Then select Insert Manifest from the application creation methods.

Inserting the Manifest​

A Kubernetes manifest is a YAML file in which various cluster components, such as Deployments, ReplicaSets, Services, and so on, are defined. If you've already written a manifest for your application, you can paste it in this section and click Start to begin creating the application.

An important point in manifests is setting the resources used by each container. This must be specified in the Deployment, in the Containers section. If resources aren't set in the manifest, 1 CPU core and 2 GB of RAM are selected by default. You also need to keep a 1:2 ratio of processor to RAM in the values you set.

Note that the Limits and Requests values 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, separate them with the "---" separator at the end of each file, and deploy them all at once on the Cloud Container.

Also note that to use Arvancloud's generation 2 or 3 processors, you need to set an affinity in your manifest, as in the following example.

affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/cloud-container-g2
operator: In
values:
- "true"

Application Creation Process​

After inserting the manifest, you're only two steps away from creating the application.

Step 1: Project Details​

First, choose the data center and infrastructure hosting your application. Currently, two regions, Bamdad and Shahriar, are available on Kubernetes. Then select one of your existing projects to deploy this application in, or create a new project.

Finally, click Continue.

Step 2: Final Review and Confirmation​

In the last step, simply choose the CPU generation for the application and review the invoice.

On this page, you can review the cost estimate hourly, daily, weekly, or monthly, broken down by each component. You can also download and save this invoice.

Whenever you turn off or delete your application, you aren't charged for CPU, RAM, or ephemeral storage.

Finally, click Create to create your application.

Application Status​

After the creation process is complete, your application is created and can be seen in the Applications section.

For more details, until the app is installed and active, you can access its events, logs, and console from the quick access section.

From then on, you can manage your app's settings with the Manage Application guide.