Custom Application Deployment
Overview
Application deployment enables you to run custom applications and web services on your clusters, making them accessible via HTTP endpoints.
Prepare Application
Application Requirements
Your application should:
- Be containerized (Docker/OCI image)
- Listen on a configurable port (typically 8080)
- Have health check endpoints
- Handle graceful shutdown
- Log to standard output
Dockerfile Example
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY app.py .
EXPOSE 8080
CMD ["python", "app.py"]
Deploy Application
Step 1: Prepare Image
Build and push Docker image:
docker build -t myregistry/myapp:v1.0 .
docker push myregistry/myapp:v1.0
Step 2: Deploy Workload from the Cluster
- Open the created cluster from the cluster list.
- Go to the Workloads tab.
- Click Add Workloads.


-
In the workload form, set:
- Configuration Method:
Manual Configuration - Name (e.g.,
nginx-workload) - Namespace (e.g.,
nginx) - Repository URL (e.g.,
https://gitlab.com/api/v4/projects/54152051/packages/helm/devel) - Chart (e.g.,
nginx) - Version (e.g.,
17.0.0) - Values (optional)
- Configuration Method:
-
Click Submit.
- Application will be:
- Pulled from registry
- Scheduled on cluster
- Started as containers
- Exposed via service
- Application will be:


Monitor Application
Application Status via Kubectl Terminal
Open Kubectl Terminal to verify workload status.
info
Workload States:
- Deploying - Rolling out
- Running - Serving requests
- Failed - Deployment error
- Scaling - Adjusting replicas

Application Status via Kubernetes Dashboard
Application status is shown in the Kubernetes dashboard.

View Logs
Access application logs:
kubectl logs deployment/<app-name>

Manage Application
Update Application
To deploy a new version:
- Push the new image to your registry.
- Update the deployment (image or manifest).
- Trigger a rolling update.
kubectl set image deployment/<deployment-name> <container-name>=<image-name>:<tag>

Scale Application
To adjust replicas:
- Select the application.
- Click Scale.
- Set the replica count.
- Confirm.
kubectl scale deployment/<app-name> --replicas=5

Expose Application
Create Service
Expose application via service:
apiVersion: v1
kind: Service
metadata:
name: myapp-service
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
app: myapp
Create Ingress
Route traffic via HTTP:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapp-ingress
spec:
rules:
- host: myapp.example.com
http:
paths:
- path: /
backend:
service:
name: myapp-service
port:
number: 80
Access Application
Access via endpoint:
https://myapp-endpoint.domain.com
Best Practices
Application Design
- Stateless application design
- 12-factor app principles
- Health checks on startup
- Graceful shutdown handling
Containerization
- Minimal base images
- Layer caching optimization
- Security scanning
- Multi-stage builds
Deployment
- Version all images
- Use image tags (not latest)
- Test images before deployment
- Rolling updates for zero-downtime
- Resource limits and requests
Monitoring
- Comprehensive logging
- Metrics collection
- Error tracking
- Performance monitoring
Common Applications
- Web APIs
- Microservices
- Frontend applications
- Batch processors
- Scheduled jobs