Resources & verbs
Pods, Deployments, Services and more, each a REST resource you get, list, watch, create, patch or delete.
Drive your clusters in Mumbai through the Kubernetes API — kubectl, client libraries and GitOps.
Free with XcellCloud. Least-privilege access, built in.
Everything in Kubernetes is an API call. kubectl apply, a Helm release, a GitOps sync and a CI deploy all send HTTPS requests to one component — the kube-apiserver — which authenticates you, checks RBAC, runs admission and stores the result. This guide shows how to reach that API on XcellHost Kubernetes clusters (managed by XcellHost or self-built on XcellCloud VMs) in our Mumbai region: getting a kubeconfig, the kubectl commands you'll use daily, how each one maps to a REST path, least-privilege RBAC, client libraries, and how clusters use OpenStack for load balancers and volumes. API access is free with XcellCloud; you pay for the nodes and resources you run. Your exact API server address is shown in the XcellCloud console → API Access.
Deploy, scale, inspect and secure — from kubectl, code or pipelines, against clusters in Mumbai.
kubectl, Code & GitOps — Same APIkubectl create token.* Typical default; the API server can set a different maximum. "XcellHost Kubernetes clusters" covers clusters XcellHost manages for you and clusters you build yourself on XcellCloud VMs — features such as the OpenStack integrations depend on how the cluster is set up.
No separate fee for API access — the access patterns, endpoints and defaults you'll plan around. Switch tabs to compare.
API server address, OIDC issuer and defaults are placeholders for planning. Your exact values are shown in the XcellCloud console → API Access. Nodes, volumes and load balancers are billed per your XcellCloud plan.
Download the kubeconfig for your cluster from the console, point kubectl at it, and you're talking to the API. The same file works for client libraries.
# 1. download the kubeconfig: console → Kubernetes → your cluster → kubeconfig
mkdir -p ~/.kube && mv ~/Downloads/xcellhost-mumbai-1.yaml ~/.kube/
chmod 600 ~/.kube/xcellhost-mumbai-1.yaml # it holds credentials
# 2. point kubectl at it (or merge into ~/.kube/config)
export KUBECONFIG=~/.kube/xcellhost-mumbai-1.yaml
kubectl config get-contexts
kubectl config use-context xcellhost-mumbai-1
# 3. check you can reach the API server
kubectl cluster-info
kubectl get nodes -o wide
kubectl auth can-i --list -n shop
kubectl get pods -n shop # list
kubectl apply -f web.yaml # create or update
kubectl describe pod -n shop -l app=web # details + events
kubectl logs -n shop deploy/web --tail=100 -f # stream logs
kubectl exec -n shop -it deploy/web -- sh # shell in a container
kubectl port-forward -n shop svc/web 8080:80 # local tunnel
kubectl rollout status -n shop deploy/web # watch a rollout
kubectl rollout undo -n shop deploy/web # roll back
kubectl get pods -n shop -v=6 # print the REST calls
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
namespace: shop
labels:
app: web
spec:
replicas: 3
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
containers:
- name: web
image: registry.xcellhost.cloud/shop/web:1.3
ports:
- containerPort: 8080
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
memory: 256Mi
readinessProbe:
httpGet:
path: /healthz
port: 8080
APISERVER=https://k8s.mumbai.xcellhost.cloud:6443
# cluster CA from your kubeconfig, and a 1-hour token for a ServiceAccount
kubectl config view --raw --minify \
-o jsonpath='{.clusters[0].cluster.certificate-authority-data}' | base64 -d > ca.crt
TOKEN=$(kubectl create token ci-deployer -n shop --duration=1h)
curl --cacert ca.crt -H "Authorization: Bearer $TOKEN" \
"$APISERVER/apis/apps/v1/namespaces/shop/deployments?limit=50"
# or let kubectl handle auth and just send the path
kubectl get --raw "/api/v1/namespaces/shop/pods?limit=50" | jq -r '.items[].metadata.name'
# pip install kubernetes
from kubernetes import client, config
config.load_kube_config(context="xcellhost-mumbai-1") # in a pod: load_incluster_config()
apps = client.AppsV1Api()
for d in apps.list_namespaced_deployment("shop").items:
print(d.metadata.name, d.status.ready_replicas, "/", d.spec.replicas)
# scale through the /scale subresource
apps.patch_namespaced_deployment_scale(
name="web", namespace="shop", body={"spec": {"replicas": 5}}
)
package main
import (
"context"
"fmt"
"log"
"os"
"path/filepath"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
)
func main() {
home, _ := os.UserHomeDir()
kubeconfig := filepath.Join(home, ".kube", "xcellhost-mumbai-1.yaml")
cfg, err := clientcmd.BuildConfigFromFlags("", kubeconfig)
if err != nil {
log.Fatal(err)
}
cs, err := kubernetes.NewForConfig(cfg)
if err != nil {
log.Fatal(err)
}
pods, err := cs.CoreV1().Pods("shop").List(context.Background(),
metav1.ListOptions{LabelSelector: "app=web"})
if err != nil {
log.Fatal(err)
}
for _, p := range pods.Items {
fmt.Println(p.Name, p.Status.Phase)
}
}
A cluster (API server URL + CA certificate), a user (token, client certificate or an OIDC login command) and a context that pairs them with a default namespace. kubectl reads $KUBECONFIG or ~/.kube/config.
chmod 600, never commit it--duration=1h) over long-lived secretskubectl auth can-i --listAdd -v=6 to any kubectl command to see the exact REST requests it sends — the translator below explains them.
Pods, Deployments, Services and more, each a REST resource you get, list, watch, create, patch or delete.
Core objects live under /api/v1; the rest under /apis/<group>/<version> — e.g. apps/v1.
Folders for resources and the natural boundary for RBAC, quotas and network policies — one per team or app.
Roles list allowed verbs on resources; RoleBindings grant them to users, groups or ServiceAccounts.
Identities for workloads and pipelines, with short-lived, audience-bound tokens instead of shared passwords.
?watch=true streams changes as they happen — how controllers, Argo CD and kubectl get -w stay current.
The API server merges your YAML and tracks which tool owns each field — fewer conflicts between kubectl, Helm and GitOps.
Custom resources extend the API — cert-manager, Argo CD and database operators all add their own kinds.
Control plane, nodes, volumes and load balancers in our Mumbai region — straightforward DPDP Act answers.
kubeconfig, API endpoint and every Kubernetes API call come with XcellCloud. You pay for what you run.
Standard API, standard tools. Your manifests, Helm charts and operators move with you.
Help from XcellHost's NOC when a rollout stalls, a node goes NotReady or RBAC blocks a deploy.
Load balancers and block volumes from XcellCloud's OpenStack services, wired in through standard integrations.
RBAC on, OIDC sign-in, short-lived tokens, network policies and audit logging — we help you set them up.
Nodes, storage, load balancers and support on one rupee invoice with input credit.
ISO 27001 & 20000-1 certified operations and a Microsoft Gold Partner.
The difference between "everyone has cluster-admin" and access you can audit, rotate and explain to an auditor.
From cluster to automated deploys — the same order our engineers follow.
Any tool that reads a kubeconfig works against XcellHost clusters. Product names belong to their owners.
Included with XcellCloud Kubernetes APIFill in the cluster, user and namespace. The builder writes a valid kubeconfig with placeholders for every secret and draws its anatomy: clusters, users, and the context that ties them together. Hover a box to find its lines. Nothing you type leaves this page.
Pick a command. The translator shows the request kubectl sends to the API server, the RBAC permission it needs, an equivalent curl call and a sample response, while a request travels through the API server's gates.
/api for core, /apis/<group> otherwise
| Group / version | Base path | Common resources | Scope |
|---|---|---|---|
| core · v1 | /api/v1 | pods services configmaps secrets persistentvolumeclaims serviceaccounts events | Namespaced (plus nodes, namespaces, persistentvolumes cluster-wide) |
| apps · v1 | /apis/apps/v1 | deployments statefulsets daemonsets replicasets | Namespaced |
| batch · v1 | /apis/batch/v1 | jobs cronjobs | Namespaced |
| networking.k8s.io · v1 | /apis/networking.k8s.io/v1 | ingresses networkpolicies | Namespaced |
| rbac.authorization.k8s.io · v1 | /apis/rbac.authorization.k8s.io/v1 | roles rolebindings clusterroles clusterrolebindings | Both |
| autoscaling · v2 | /apis/autoscaling/v2 | horizontalpodautoscalers | Namespaced |
| storage.k8s.io · v1 | /apis/storage.k8s.io/v1 | storageclasses csidrivers volumeattachments | Cluster-wide |
Run kubectl api-resources -o wide on your cluster for the full, current list with verbs and short names.
Choose a namespace and a ServiceAccount, then switch on verbs per resource in the matrix (click a header to toggle a whole row or column). The builder writes the ServiceAccount, Role and RoleBinding, flags risky grants and lists the kubectl auth can-i checks to run.
On OpenStack-based clouds like XcellCloud, clusters typically run the OpenStack cloud-controller-manager (load balancers through Octavia) and the Cinder CSI driver (block volumes). Confirm which integrations are enabled on your cluster.
Create a Service of type LoadBalancer and the OpenStack cloud-controller-manager asks Octavia for a load balancer; the external IP appears in kubectl get svc. Annotations tune it — typical OpenStack integration; confirm on your cluster.
apiVersion: v1
kind: Service
metadata:
name: web
namespace: shop
annotations:
# keep the floating IP if the Service is deleted (OpenStack CCM)
loadbalancer.openstack.org/keep-floatingip: "true"
# internal-only load balancer instead of a public IP:
# service.beta.kubernetes.io/openstack-internal-load-balancer: "true"
spec:
type: LoadBalancer
selector:
app: web
ports:
- name: http
port: 80
targetPort: 8080
kubectl apply -f service.yaml
kubectl get svc web -n shop -w # EXTERNAL-IP goes from <pending> to an address
kubectl describe svc web -n shop # events from the cloud-controller-managerA StorageClass with the Cinder CSI provisioner turns every claim into a block volume in XcellCloud. WaitForFirstConsumer creates the volume in the same zone as the pod. The volume type name below is a placeholder.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: cinder-ssd
provisioner: cinder.csi.openstack.org
parameters:
type: ssd # Cinder volume type — placeholder
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-data
namespace: shop
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: cinder-ssd
resources:
requests:
storage: 50GiStart each namespace with a default-deny policy, then allow only the traffic each app needs. Network policies need a CNI that enforces them (for example Calico or Cilium) — confirm on your cluster.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-ingress
namespace: shop
spec:
podSelector: {}
policyTypes: ["Ingress"]
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-web-from-ingress
namespace: shop
spec:
podSelector:
matchLabels:
app: web
policyTypes: ["Ingress"]
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: ingress
ports:
- protocol: TCP
port: 8080Helm renders a chart into manifests and applies them through the same API, keeping a history so you can roll back. Pin chart versions and keep per-environment values in Git.
helm upgrade --install web ./charts/web \
--namespace shop --create-namespace \
--values values-mumbai.yaml \
--set image.tag=1.4 \
--wait --timeout 5m
helm list -n shop
helm history web -n shop
helm rollback web 3 -n shop # back to revision 3With GitOps, an agent inside the cluster pulls the desired state from Git and applies it — no cluster credentials in your CI system. This Argo CD Application syncs one folder and heals drift.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: shop
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/acme/shop-deploy.git
targetRevision: main
path: k8s/overlays/mumbai
destination:
server: https://kubernetes.default.svc
namespace: shop
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=trueWhoever can call the Kubernetes API can run code in your cluster. These defaults keep that list short and auditable.
Sign in through your identity provider; removing a leaver there ends their cluster access.
Use kubectl create token --duration or projected tokens, not long-lived Secret tokens.
Namespace Roles, no wildcards, and cluster-admin kept for break-glass only.
Add kubeconfig files to .gitignore; give CI a scoped ServiceAccount through its secret store.
Allow the API server only from office, VPN and CI IP ranges where the cluster supports it.
Personal data in Mumbai-region volumes, encrypted Secrets at rest, and audit logs that show who accessed what.
RoleBinding cuts access immediately.mumbai-1 keep workloads and volumes in India.It is the HTTPS REST API served by kube-apiserver. Every object — pods, deployments, services, roles — is a resource you read and change through it. kubectl, Helm, GitOps agents and controllers are all API clients.
Yes. The kubeconfig, API endpoint and API calls come free with XcellCloud. You pay for the nodes, volumes and load balancers your cluster uses, or for XcellHost's management if we run the cluster for you.
Both patterns are covered here: XcellHost Kubernetes clusters managed by XcellHost, or clusters you build yourself on XcellCloud VMs. The API works the same; integrations such as Octavia load balancers and Cinder volumes depend on how the cluster is set up. Talk to us about the managed option.
From the XcellCloud console → API Access (or the Kubernetes section) for your cluster. The server address on this page, https://k8s.mumbai.xcellhost.cloud:6443, is an example placeholder.
People: OIDC through your identity provider with MFA, using a kubectl login plugin. Pipelines: a ServiceAccount with a namespace-scoped Role and short-lived tokens. Client certificates are best kept for break-glass admin access because they can't be revoked individually.
Add -v=6 to any kubectl command to log the request URLs, or -v=8 to include headers and bodies. kubectl get --raw /api/v1/namespaces/shop/pods sends a raw request with your kubeconfig's credentials.
A Role grants permissions inside one namespace. A ClusterRole is defined cluster-wide; bound with a RoleBinding it applies to one namespace, bound with a ClusterRoleBinding it applies everywhere. Prefer Roles and RoleBindings.
Typically through the OpenStack cloud-controller-manager, which creates Octavia load balancers for type: LoadBalancer Services, and the Cinder CSI driver, which provisions block volumes for PersistentVolumeClaims. Confirm both are enabled on your cluster.
Yes. Helm, Kustomize, Argo CD and Flux use the standard Kubernetes API. GitOps agents run inside the cluster and pull from Git, so your CI system doesn't need cluster credentials.
Any official or community Kubernetes client — client-go, the Python kubernetes package, the Java and JavaScript clients and others. They read the same kubeconfig, or use in-cluster config when running in a pod.
Clusters in the mumbai-1 region run their nodes, volumes and load balancers in XcellHost's Mumbai infrastructure. Images pulled from public registries and any external services you call are outside that boundary.
Remove the RoleBinding or ServiceAccount (or disable the user in your identity provider), rotate any long-lived credentials, then review the API audit log. Call XcellHost's 24×7 NOC on +91 22 6711 1555 for help and assess whether CERT-In's 6-hour reporting applies.