Getting started¶
Medium and Large clusters are set up within 2 business days of the order, in an emergency within 24 hours on request; you receive the Rancher URL and login. Enterprise and custom configurations (GPU nodes, memory-optimised nodes, multi-datacenter) depend on hardware availability. Lead times vary; we agree the schedule with you in the initial call.
Cluster access¶
- Log in to Rancher (
<yourcompany>.rancher.zeroservices.eu). - Download the kubeconfig from the cluster page.
- Use it with kubectl:
export KUBECONFIG=~/kubeconfig.yaml
kubectl cluster-info
kubectl get nodes
First deployment¶
kubectl create deployment webapp --image=nginx:latest --replicas=3
kubectl expose deployment webapp --port=80 --type=ClusterIP
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: webapp
annotations:
kubernetes.io/ingress.class: haproxy
spec:
rules:
- host: webapp.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webapp
port:
number: 80
EOF
kubectl get pods,svc,ingress
provider "kubernetes" {
config_path = "~/kubeconfig.yaml"
}
resource "kubernetes_deployment_v1" "webapp" {
metadata {
name = "webapp"
labels = { app = "webapp" }
}
spec {
replicas = 3
selector {
match_labels = { app = "webapp" }
}
template {
metadata {
labels = { app = "webapp" }
}
spec {
container {
name = "nginx"
image = "nginx:latest"
port {
container_port = 80
}
}
}
}
}
}
Helm, ArgoCD, Flux and Pulumi work the same way against the kubeconfig.