Creating Cluster

This guide walks you through creating a Kubernetes cluster using the Krutrim Kubernetes Service.

Before You Begin

Ensure you have:

Cluster Configuration

When creating a cluster, you'll need to configure the following settings:

Basic Settings:

  • Cluster Name: Choose a descriptive name for your cluster.

  • Kubernetes Version:

    • Select the Kubernetes version for your cluster:

      • Recommended: Use the default version of Krutrim Kubernetes Service

      • Specific Version: Choose if you have application compatibility requirements

Note: You can upgrade the Kubernetes version later, but you cannot downgrade.

Network Configurations

  • VPC Configuration:

    • Select the VPC you want your cluster to be in

    • This defines the network boundary for your cluster

  • Subnet Configuration:

    • Specify the subnet where your cluster resources will be deployed

    • Ensure the subnet has sufficient IP addresses

    • Important: This subnet is used for LoadBalancer IP allocation

LoadBalancer IP Usage:

Kubernetes Network Configuration

Pod CIDR

  • Default: 192.168.0.0/16

  • Understanding Pod CIDR:

    • This CIDR is the IP range for pods in your cluster

    • Each node receives a /24 subnet (256 IPs) from this CIDR range

    • Capacity: /16 = 256 nodes max, /18 = 64 nodes max, /20 = 16 nodes max

  • Pod CIDR cannot be changed after cluster creation. Plan for future growth!

Examples:

Calculation:

Service CIDR

  • Default: 10.100.0.0/16

  • Understanding Service CIDR:

    • This CIDR is the IP range for Kubernetes Services (ClusterIP, NodePort, LoadBalancer)

    • Each Service consumes one IP from this range

  • Service CIDR must not overlap with Pod CIDR

Examples:

Network Configuration Examples

Development/Testing Cluster:

Production Cluster:

Cluster Creation Process

After submitting your cluster configuration:

Verification Checklist

Before creating the cluster, verify:

Network Capacity Planning:

Cluster Creation Stages

1

Creating

Initial resources are being provisioned.

  • Timeline (part of total): Initial setup — 1-2 minutes

2

Provisioning

Control plane, network, and integrations are being configured.

  • Timeline (part of total): Control plane provisioning — 2-3 minutes; Network configuration — 1-2 minutes

3

Provisioned

Cluster is ready. Wait until status shows PROVISIONED before creating node groups.

Overall Timeline:

  • Total time: Approximately 5-8 minutes

What's Happening:

1

Control plane is being created

2

Network resources are being configured

3

OpenStack integration is being set up

4

Core infrastructure components are being installed

Monitoring Status:

  • Cluster status transitions: CREATINGPROVISIONINGPROVISIONED

  • Monitor the cluster status to track progress

⚠️ Important: Do not create node groups until the cluster status is PROVISIONED

Next Steps After Cluster Creation

Create Initial Node Groups

Once your cluster is provisioned, you need to create node groups to run your workloads.

Critical First Step: Create at least 1-2 nodes without taints to ensure system components can be scheduled.

Why This Matters:

Recommended Approach:

1

Create Initial Node Group (without taints)

Example configuration:

2

Create Additional Node Groups (with or without taints)

Example configuration:

See Managing Node Groups for detailed instructions.

Install Add-ons

After creating node groups, install necessary add-ons for your cluster.

Essential Add-ons

CoreDNS:

  • Provides DNS service for the cluster

  • Required for service discovery

  • Must be installed manually

  • You can choose to install your own cluster DNS service also

CNI (Container Network Interface) - REQUIRED

You must install a CNI for pod networking:

Option 1: Cilium (Recommended):

  • Optimized for Krutrim Cloud

  • eBPF-based networking

  • High performance and security

  • Important: Do NOT install kube-proxy if using Cilium

Option 2: Your Own CNI:

  • You can install kube-proxy

  • Then install your preferred CNI solution

  • Note: Our Cilium add-on may not work with kube-proxy

CNI Installation Priority:

See Installing Add-ons for detailed instructions.

Access Your Cluster

Once all components are installed, you can access your cluster using the kubeconfig file.

Obtain Kubeconfig:

  • Retrieve the kubeconfig file for your cluster

  • Save the file securely (this contains cluster access credentials)

Verify Cluster Access:

Check Node Status:

Expected output:

Verify System Pods:

All pods should be in Running state:

Common Issues During Creation

Issue: Cluster Stuck in CREATING

Possible Causes:

  • VPC or subnet validation issues

  • Network connectivity problems

  • Resource quota limits

Solution:

  1. Check if VPC and subnet are accessible

  2. Verify your account has sufficient quota

  3. Contact support if issue persists

Issue: Node Groups Not Creating

Possible Causes:

  • Cluster not yet in PROVISIONED state

  • Insufficient subnet IPs

  • Invalid node configuration

  • Resource issue within Krutrim Cloud

Solution:

  1. Wait for cluster to reach PROVISIONED state

  2. Verify subnet has available IPs

  3. Check node group configuration

  4. Contact support if issue persists

Issue: Pods Not Starting

Possible Causes:

  • CNI not installed

  • All nodes have taints

  • No nodes without taints available

Solution:

  1. Install Cilium or your CNI

  2. Ensure at least 1-2 nodes without taints exist

  3. Verify node status with kubectl get nodes

Best Practices for Cluster Creation

✅ Do's

  1. Plan Network Ranges:

    • Calculate required nodes before choosing Pod CIDR

    • Use default CIDRs unless you have specific requirements

    • Ensure no overlap between Pod and Service CIDRs

  2. Create Untainted Nodes First:

    • Always create 1-2 nodes without taints

    • Use appropriate sizing (minimum 2vcpu-4gb)

    • Wait for nodes to be ready before deploying workloads

  3. Install CNI Immediately:

    • Install Cilium or your CNI right after node creation

    • Verify all nodes reach Ready state

    • Check that all system pods are running

  4. Use Descriptive Names:

    • Include environment in name (dev, staging, prod)

    • Include purpose (web, api, data)

    • Use consistent naming conventions

  5. Plan for Growth:

    • Choose Pod CIDR with room for expansion

    • Ensure subnet has sufficient IPs for future LoadBalancers

    • Consider future node group additions

❌ Don'ts

  1. Don't Use Small Pod CIDRs:

    • Avoid /24 or /22 for production

    • Don't underestimate growth

  2. Don't Forget Untainted Nodes:

    • Never create only tainted nodes

    • Don't skip CoreDNS verification

  3. Don't Mix CNI Strategies:

    • Don't install both Cilium and kube-proxy

    • Choose one networking approach

  4. Don't Use Reserved Ranges:

    • Avoid 172.24.0.0/13 for Pod or Service CIDR

    • Check for conflicts with existing infrastructure

Next Steps

After successfully creating your cluster:

  1. Configure Storage - Set up persistent storage for your applications

  2. Create Load Balancers - Expose your services to the internet

  3. Learn Best Practices - Optimize your cluster for production use

Additional Resources

Last updated

Was this helpful?