Skip to main content

Container as a Service

Container as a Service Interface

Run and scale containerized workloads without managing Kubernetes clusters or virtual machines.

Overview

Container as a Service (CaaS) handles infrastructure so you can focus on your application:

  • Scheduling and lifecycle management
  • Scaling and auto-healing
  • Load balancing and networking
  • Monitoring, logging, and cost optimization
  • CI/CD integration with GitHub Actions

Prerequisites

  • Project dashboard or API access
  • Container image (public or private registry)
  • (Optional) Registry credentials for private images
  • (Optional) Domain or subdomain for public endpoints
  • (Optional) GitHub repository for automated deployments

Step 1: Create Container Instance

  1. Navigate to Compute > Container as a Service
  2. Click Create Container
  3. Configure:
SettingDescription
Container Imagee.g., registry.example.com/app:latest
Registry CredentialsRequired for private registries
Startup CommandOptional entrypoint override
Region/ZoneDeployment location
CPU and MemoryResource allocation
AutoscalingMin/max instances (e.g., 1-5)
  1. Click Create

Deployment takes a few minutes. Status becomes Active when ready.


Step 2: Configure Runtime

SettingDescription
Ports and ProtocolsHTTP, HTTPS, TCP exposure
Environment VariablesCredentials, API keys, configs
Scaling RulesCPU, memory, or request rate thresholds
Container LifetimeScale-to-zero when idle
Secrets ManagementSecure environment bindings

Step 3: Networking and Access

  • Each container gets a unique endpoint (public or private)
  • Map custom domain via CNAME record
  • Configure TLS certificates (upload or auto-generate)
  • Restrict to private subnets for internal systems

Step 4: CI/CD with GitHub Actions

Example Workflow

name: Deploy Container
on:
push:
branches: [ "main" ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build Docker image
run: docker build -t registry.example.com/myapp:${{ github.sha }} .

- name: Log in to registry
run: echo ${{ secrets.REGISTRY_PASSWORD }} | docker login registry.example.com -u ${{ secrets.REGISTRY_USER }} --password-stdin

- name: Push image
run: docker push registry.example.com/myapp:${{ github.sha }}

- name: Deploy to CaaS
run: |
curl -X POST https://api.yourplatform.net/v1/containers/deploy \
-H "Authorization: Bearer ${{ secrets.CAAS_API_KEY }}" \
-d '{"image": "registry.example.com/myapp:'${{ github.sha }}'"}'

Extend with automated tests, Slack notifications, or blue-green releases.


Step 5: Monitoring and Logs

  • Monitor status, CPU/memory usage, instance count via dashboard
  • Stream logs via console or API:
caas logs <container-id>
  • Integrate with ELK, Loki, or CloudWatch
  • Set up alerts for latency or failed deploys

Step 6: Lifecycle Management

ActionDescription
Start/Stop/RestartControl containers anytime
RedeployUpdate with new image tag
DeleteFree resources from old instances
RollbackRevert to previous stable image

Features Summary

FeatureDescription
Managed RuntimeNo server or cluster management
Registry SupportPublic and private registries
AutoscalingDemand-based scaling
Scale-to-ZeroSuspend idle containers
Custom DomainsBranded URL endpoints
CI/CD IntegrationGitHub Actions automation
Secrets ManagementSecure config injection
Monitoring and LoggingCentralized metrics and logs
Pay-as-you-goCharged only while running

Troubleshooting

IssueCauseSolution
Container stuck in PendingQuota exceeded or image pull issueCheck capacity and registry credentials
GitHub Actions deploy failedInvalid API tokenVerify CAAS_API_KEY secret
Logs not visibleLogging disabledEnable log streaming
Domain not resolvingIncorrect DNSVerify CNAME and propagation
Autoscaling not triggeringThresholds too highLower triggers, verify monitoring