//Technology

Kubernetes & Container Hosting: A Practical Guide for Growing Businesses

Kubernetes lets Indian businesses scale containers efficiently; learn why it fits, how to set up a cluster, and best practices for secure, cost‑effective deployment.

7 min read
Kubernetes & Container Hosting: A Practical Guide for Growing Businesses

Kubernetes has evolved from a trendy term into a proven platform for businesses that need to run containers at scale. For growing Indian enterprises—whether you host e-commerce sites, mobile back-ends, or SaaS applications—understanding how to pair Kubernetes with reliable container hosting can cut costs, improve reliability, and accelerate development.

Why Kubernetes Makes Sense for Growing Businesses

Kubernetes (often abbreviated K8s) automates the deployment, scaling, and management of containerised workloads. Its core benefits match the challenges faced by expanding companies:

  • Scalable infrastructure: Add or remove compute resources without redeploying applications.
  • High availability: Pods are automatically rescheduled if a node fails, keeping services online.
  • Resource efficiency: Containers share the same OS kernel, reducing overhead compared with traditional VMs.
  • Consistent environments: Development, staging, and production can use the same container images, minimising “it works on my machine” issues.
  • Vendor-agnostic: Kubernetes runs on public clouds, private data centres, or hybrid setups, giving you flexibility as your business evolves.

Choosing the Right Container Hosting Model

Before you dive into Kubernetes, decide how you want to host your containers. The main options are:

  1. Managed Kubernetes services: Providers such as AtoZNode offer a fully managed control plane, handling upgrades, backups, and security patches. This reduces operational overhead.
  2. Self-managed clusters on VPS or dedicated servers: You retain full control over the underlying hardware and network configuration, which can be cost-effective for predictable workloads.
  3. Hybrid approach: Run critical workloads on dedicated servers for performance, while using a managed service for burst capacity.

For most growing businesses, starting with a managed service and gradually moving parts to self-managed nodes offers a smooth learning curve.

Setting Up a Basic Kubernetes Cluster

Below are the essential steps to spin up a small, production-ready cluster. The commands are split for Debian/Ubuntu (using apt) and for AlmaLinux/Rocky/RHEL (using dnf). Windows Server requires a different installation method and is not covered here.

1. Install Container Runtime (Docker)

Debian/Ubuntu

# Update package index
sudo apt update

# Install Docker Engine
sudo apt install -y ca-certificates curl gnupg lsb-release

# Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# Set up the stable repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install Docker packages
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io

# Enable Docker to start on boot
sudo systemctl enable docker

AlmaLinux/Rocky/RHEL

# Install required packages
sudo dnf install -y yum-utils device-mapper-persistent-data lvm2

# Add Docker’s official repository
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

# Install Docker Engine
sudo dnf install -y docker-ce docker-ce-cli containerd.io

# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker

These commands add Docker’s official repository, install the engine, and configure it to start automatically.

2. Install kubeadm, kubelet, and kubectl

Debian/Ubuntu

# Add Kubernetes apt repository
sudo curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF

# Update index and install packages
sudo apt update
sudo apt install -y kubelet kubeadm kubectl

# Hold packages at current version
sudo apt-mark hold kubelet kubeadm kubectl

AlmaLinux/Rocky/RHEL

# Add Kubernetes repo
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF

# Set SELinux to permissive (required for some setups)
sudo setenforce 0
sudo sed -i --follow-symlinks 's/^SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config

# Install packages
sudo dnf install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

# Enable and start kubelet
sudo systemctl enable --now kubelet

These tools allow you to initialise the cluster (kubeadm init), run the node agent (kubelet), and interact with the API (kubectl).

3. Initialise the Control Plane

# Initialise with a pod network CIDR (example uses Calico)
sudo kubeadm init --pod-network-cidr=192.168.0.0/16

After the command finishes, follow the printed instructions to set up kubectl for the regular user:

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

4. Deploy a Pod Network

Without a network plugin, pods cannot communicate. Calico is a popular, lightweight choice.

# Apply Calico manifest
kubectl apply -f https://projectcalico.org/manifests/calico.yaml

The manifest creates the necessary DaemonSets, ConfigMaps, and RBAC rules.

5. Add Worker Nodes

On each worker server, install Docker and the kube packages (steps 1–2). Then run the join command that kubeadm init printed, for example:

sudo kubeadm join 203.0.113.10:6443 --token abcdef.0123456789abcdef \
    --discovery-token-ca-cert-hash sha256:1234abcd5678efgh...

This registers the node with the control plane, and the scheduler will start placing pods on it.

Deploying Real-World Workloads

Once the cluster is up, you can run typical business applications. Below are two common patterns.

Stateless Web Services

Stateless services (e.g., a Node.js API) scale easily because any replica can handle a request. A minimal deployment looks like this:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-api
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web-api
  template:
    metadata:
      labels:
        app: web-api
    spec:
      containers:
      - name: web-api
        image: ghcr.io/yourorg/web-api:latest
        ports:
        - containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: web-api-svc
spec:
  type: LoadBalancer   # Works with cloud LB or MetalLB on-prem
  selector:
    app: web-api
  ports:
  - port: 80
    targetPort: 8080

Apply with kubectl apply -f web-api.yaml. The Service exposes the pods, and the LoadBalancer type integrates with the underlying provider’s external IP allocation.

Stateful Databases

For databases (MySQL, PostgreSQL, MongoDB) you need persistent storage. Kubernetes uses PersistentVolumeClaim objects that bind to storage classes offered by your host (e.g., local-disk, LVM, or cloud block storage).

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: db-data
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
  storageClassName: fast-ssd   # Adjust to your environment
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: postgres
spec:
  serviceName: "postgres"
  replicas: 1
  selector:
    matchLabels:
      app: postgres
  template:
    metadata:
      labels:
        app: postgres
    spec:
      containers:
      - name: postgres
        image: postgres:15
        env:
        - name: POSTGRES_PASSWORD
          valueFrom:
            secretKeyRef:
              name: pg-secret
              key: password
        ports:
        - containerPort: 5432
        volumeMounts:
        - name: db-data
          mountPath: /var/lib/postgresql/data
  volumeClaimTemplates:
  - metadata:
      name: db-data
    spec:
      accessModes: ["ReadWriteOnce"]
      resources:
        requests:
          storage: 20Gi
      storageClassName: fast-ssd

StatefulSets guarantee stable network IDs and persistent storage across pod restarts, which is essential for database reliability.

Operational Best Practices for Indian Enterprises

Running Kubernetes in production requires more than a working cluster. Consider these practices to keep workloads secure and performant:

  • Namespace isolation: Separate development, testing, and production workloads into distinct namespaces. Use NetworkPolicy objects to restrict traffic.
  • Resource quotas: Prevent a single team from exhausting cluster resources by defining CPU and memory limits per namespace.
  • Regular updates: Patch the control plane and node OS monthly. Managed services often handle this automatically, but self-managed clusters need a defined maintenance window.
  • Backup strategy: Export etcd snapshots and back up PersistentVolume data to an off-site location (e.g., an S3-compatible bucket).
  • Monitoring and logging: Deploy Prometheus for metrics and Loki or Elasticsearch for logs. Grafana dashboards give quick insight into pod health and node utilisation.
  • Security hardening: Enable RBAC, use Pod Security Standards, and rotate service account tokens regularly.

Cost Management Tips

For growing businesses, controlling cloud spend is as important as technical capability.

  1. Right-size nodes: Choose instance types that match your average CPU/memory usage. Over-provisioned nodes waste money.
  2. Use autoscaling: Cluster Autoscaler adds nodes when pending pods exceed capacity and removes idle nodes after a grace period.
  3. Leverage spot/preemptible instances: For non-critical batch jobs, these can cut compute costs by up to 80%.
  4. Consolidate workloads: Run multiple low-traffic services on the same node using resource limits; avoid dedicating a whole VM per service.

Conclusion

Kubernetes offers a robust foundation for Indian businesses that need to scale containerised applications without sacrificing control or reliability. By selecting the appropriate hosting model, following a clear installation path, and applying operational best practices, you can turn a modest cluster into a production-grade platform that grows with your traffic and feature set. Whether you start with a managed service from AtoZNode or build your own cluster on dedicated servers, the principles outlined here will help you deliver stable, secure, and cost-effective services to your customers.

kubernetescontainer hostingmanaged kubernetesself‑managed clusterspod networkingstateful workloadscost optimizationindian enterprises

Try it on your own server

Follow along on a Cloud VPS with full root access, or read the step-by-step knowledge base guides.