Skip to main content
Servers Are Up
Virtual Datacenter
PricingFree Tools
Sign inBrowse catalog
Servers Are Up
Virtual Datacenter
PricingFree Tools
Sign inBrowse catalog

Loading…

Servers Are Up

Your apps, automation and data on hardware we own. Build a private stack with predictable capacity and access through your dashboard, API or SSH.

SLA with service creditsOwned hardwareUS-based

Make room for your next idea

Explore the capacity, apps and access options that fit your workload. Check current availability and your total before you buy.

Sign up freeView Pricing

Products

  • Linux VPS
  • Windows VPS
  • Cloud & SaaS Services
  • Cloud Storage (Azure)
  • Virtual Datacenter
  • AI & Agent Hosting
  • Containers
  • Instant Apps
  • Software Platforms
  • Network builder
  • Game Servers
  • Pricing

Resources

  • Free Network Tools
  • 2026 Pricing Benchmark
  • Live SVG Badges
  • Latency & Speed Test
  • Guides & Tutorials
  • Documentation
  • API Reference
  • MCP Server
  • CLI & SDKs
  • OpenAPI & llms.txt
  • Use Cases
  • Free Migration
  • Uptime & Reliability
  • Datacenter
  • System Status
  • Network
  • Provider Comparisons Hub
  • Compare Providers

Company

  • About Us
  • Enterprise
  • Security Architecture
  • Trust Center
  • Blog
  • FAQ
  • Compliance
  • Startup Program
  • Open-Source Sponsorship
  • Press & Media Kit
  • Referral Program
  • Help Center
  • Contact Us
© Servers Are Up
TermsPrivacySLARefund PolicyDPAAcceptable Use
Service information
Docs
  • Documentation Hub
  • Choose a Product
    VMs, Containers & Cloud
  • First Linux Server
    SSH, Firewall & Apps
  • Windows Server 2025
    BYOL & Remote Desktop
  • Remote Access
  • Troubleshooting
  • FAQ
  • All Product Guides
    29 Step-by-Step Guides
  • Cloud & SaaS Catalog
    112 Cloud & SaaS Offerings
  • Azure Cloud Storage
    Hot/Cool/Archive & WORM
  • Resource Manager & RBAC
    Groups, Tags & Locks
  • Multi-Model Cloud DB
    JSONB, SQL & pgvector
  • Cloud Identity & ZTNA
    OIDC, SCIM & PIM
  • Key Vault & KMS
    Secrets & Envelope Keys
  • Cloud SIEM, SOAR & DLP
    Posture & Threat Response
  • API Gateway & Cloud DNS
    Edge WAF & DNS Zones
  • Serverless, Workflows & IoT
    Functions, Queues & DAGs
  • SaaS, Governance & Vault
    Budgets & Off-Host GRS
  • Build Web Apps with AI
  • Next.js and React
  • TypeScript and Node.js
  • npm and Tooling
  • Data and APIs
  • Deploy and Operate
  • Tutorials
  • Infrastructure
  • Automation & Regions
  • API Overview
  • API v1 Reference
    Endpoints & 23 Scopes
  • MCP Server
    129 AI Agent Tools
  • Swagger / OpenAPI 3.1
  • API Playground
  • Versioning & Sunset
  • API Token Security
    Authentication & Tokens
  • Instances API
    Compute Resources
  • Networking API
    Networks & Ports
  • Storage API Availability
    Volumes & Backups
  • Webhooks & Events
    Event Notifications
  • Rate Limits & Best Practices
    Throttling & Retries
  • sau CLI Reference
    34 Commands (v0.2)
  • Browser Web CLI
  • SDKs
  • Infrastructure as Code
    Terraform & Ansible
  • Code Examples
  • CLI & SDK Guides
  • Security Guides
  • Security at a Glance
  • Zero Trust Architecture
  • Live Trust Center
  • Compliance
Need help?

Loading documentation...

Documentation/products

Deploy and expose your first app on Managed Kubernetes

Connect kubectl to your Servers Are Up K3s Kubernetes cluster, deploy a replicated service with probes and expose it with Traefik HTTPS.

Intermediate
25 min
Updated 2026-11-12

Deploy Ready-to-Run Infrastructure in Seconds

Linux VMs from $6/mo · Pooled Virtual Datacenters from $12/mo · Use code WELCOME20 for 20% off your first order.

Browse ServersView Pricing

Commands checked on 2026-11-12 with K3s v1.31 (Kubernetes 1.31), kubectl 1.31, Traefik v3.

What you will have at the end

Your workstation's kubectl will connect securely to a CNCF-certified K3s Kubernetes cluster on Servers Are Up, running a two-replica stateless Deployment with CPU/memory requests and limits, readiness and liveness probes, a ClusterIP Service, and a TLS-terminated Ingress route serving traffic on your custom domain.

Before you start

  • kubectl (v1.30+) installed locally (kubectl version --client).
  • A Managed Kubernetes (K3s) cluster provisioned from /containers or Home > Create a resource (/dashboard/store), or a K3s node running on an Ubuntu 24.04 Linux VPS.
  • A domain or subdomain (such as k8s-app.example.com) pointed at your cluster's ingress IPv4 address (203.0.113.60), with inbound ports 80 and 443 enabled in Network > Firewall (/dashboard/network?tab=firewall).

Steps

1. Export kubeconfig over an SSH tunnel or private VPN

Keep TCP port 6443 (the Kubernetes API server) off the public internet whenever possible. Copy /etc/rancher/k3s/k3s.yaml from the control-plane host into ~/.kube/sau-k3s.yaml with 0600 permissions and bind a local SSH port forward (or use your environment's WireGuard mesh IP 172.30.1.20):

install -d -m 0700 ~/.kube
ssh -i ~/.ssh/id_sau_ed25519 -p 31001 ubuntu@203.0.113.60 "sudo cat /etc/rancher/k3s/k3s.yaml" \
  | sed 's/127.0.0.1:6443/127.0.0.1:16443/' > ~/.kube/sau-k3s.yaml
chmod 0600 ~/.kube/sau-k3s.yaml

# Open a background local tunnel to the K3s API server
ssh -i ~/.ssh/id_sau_ed25519 -p 31001 -fN -L 16443:127.0.0.1:6443 ubuntu@203.0.113.60

export KUBECONFIG=~/.kube/sau-k3s.yaml
kubectl get nodes -o wide

2. Create a dedicated namespace and non-root Deployment manifest

Isolate application workloads outside default and kube-system. Save the following declarative manifest as k8s-web-app.yaml, defining a namespace, a two-replica rolling Deployment running as non-root UID 101, and a ClusterIP Service:

apiVersion: v1
kind: Namespace
metadata:
  name: prod-web
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-frontend
  namespace: prod-web
spec:
  replicas: 2
  revisionHistoryLimit: 5
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: web-frontend
  template:
    metadata:
      labels:
        app.kubernetes.io/name: web-frontend
    spec:
      securityContext:
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: web
          image: nginxinc/nginx-unprivileged:1.27-alpine
          ports:
            - containerPort: 8080
              name: http
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              cpu: 500m
              memory: 256Mi
          readinessProbe:
            httpGet:
              path: /
              port: http
            initialDelaySeconds: 3
            periodSeconds: 10
          livenessProbe:
            httpGet:
              path: /
              port: http
            initialDelaySeconds: 10
            periodSeconds: 20
---
apiVersion: v1
kind: Service
metadata:
  name: web-frontend
  namespace: prod-web
spec:
  selector:
    app.kubernetes.io/name: web-frontend
  ports:
    - name: http
      port: 80
      targetPort: http

Apply the manifest and watch the rollout finish with zero unavailable pods:

kubectl apply -f k8s-web-app.yaml
kubectl -n prod-web rollout status deployment/web-frontend

3. Install cert-manager and expose the Service via Traefik Ingress

K3s ships with Traefik pre-installed as the cluster Ingress controller. Install cert-manager once per cluster to automate Let's Encrypt certificates, then create a ClusterIssuer and Ingress:

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.1/cert-manager.yaml
kubectl -n cert-manager rollout status deployment/cert-manager-webhook

Save k8s-ingress.yaml and apply it:

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
spec:
  acme:
    email: ops@example.com
    server: https://acme-v02.api.letsencrypt.org/directory
    privateKeySecretRef:
      name: letsencrypt-prod-account-key
    solvers:
      - http01:
          ingress:
            ingressClassName: traefik
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: web-frontend
  namespace: prod-web
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
  ingressClassName: traefik
  tls:
    - hosts:
        - k8s-app.example.com
      secretName: k8s-app-tls
  rules:
    - host: k8s-app.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web-frontend
                port:
                  number: 80
kubectl apply -f k8s-ingress.yaml

Check that it works

Verify that both pods are 1/1 Running, the Certificate reaches Ready=True, and your HTTPS domain responds with HTTP/2 200:

kubectl -n prod-web get pods,svc,ingress,certificate
curl -fsSI https://k8s-app.example.com | head -n 5

Test zero-downtime rolling updates by bumping an annotation (kubectl -n prod-web rollout restart deployment/web-frontend) while running curl in another terminal—no requests drop because maxUnavailable: 0 waits for the new pod's readinessProbe before terminating an old pod.

What can go wrong

  • Unable to connect to the server: EOF or certificate mismatch on 6443. If you connect over a public or VPN IP not listed in K3s's API server SANs, add tls-san: ["172.30.1.20"] to /etc/rancher/k3s/config.yaml and run sudo systemctl restart k3s, or connect through 127.0.0.1 over the SSH port-forward shown in Step 1.
  • Certificate stays Ready=False in cert-manager. Run kubectl -n prod-web describe challenge—almost always DNS for k8s-app.example.com still points elsewhere or inbound port 80 is blocked in Network > Firewall (/dashboard/network?tab=firewall).
  • Pods fail with CreateContainerConfigError: container has runAsNonRoot and image will run as root. Standard nginx:alpine runs master processes as UID 0; use nginxinc/nginx-unprivileged or set USER 1000 in your own Dockerfile.

Good practice

  • Always declare resources.requests and resources.limits on every container so a memory leak in one pod cannot evict coredns, traefik, or kubelet on the node.
  • Pull proprietary images from Compute > Container registry (/dashboard/container-registry) using namespace-scoped kubernetes.io/dockerconfigjson pull secrets.
  • Back up K3s etcd/SQLite state snapshots (/var/lib/rancher/k3s/server/db/snapshots) off-host to Home > Cloud storage & pub/sub (/dashboard/blob-storage).

Where to go next

  • Run your first Docker Compose stack on Managed Docker
  • Run serverless functions, workflows, queues and OCI registries
  • Connect servers privately with WireGuard and site-to-site VPN

Related Articles

Create a scoped API key and send your first v1 request

Read more

Route APIs with Edge WAF, rate limits and Cloud DNS

Read more

Purchase Azure-backed cloud storage with WORM locks and SAS

Read more

Frequently Asked Questions

What does the Deploy and expose your first app on Managed Kubernetes documentation guide cover?
Connect kubectl to your Servers Are Up K3s Kubernetes cluster, deploy a replicated service with probes and expose it with Traefik HTTPS. It is rated intermediate difficulty (25 min) and applies to Servers Are Up infrastructure and workflows.
Can I manage or automate these steps through the Servers Are Up dashboard, REST API v1, or MCP server?
Yes. Every Servers Are Up server includes browser-based SSH, WebRDP, and VNC console access in the dashboard, plus programmatic control via the REST API v1 (/api/v1) and hosted Model Context Protocol server (/api/mcp/v1) using a scoped Personal Access Token.

Need hands-on help with Deploy and expose your first app on Managed Kubernetes?

Every Servers Are Up virtual machine and container includes an integrated HTML5 browser-based SSH, RDP, and VNC console in your dashboard, default-off inbound firewall rules with per-IP allow-lists, and full programmatic control via REST API v1 and Model Context Protocol (MCP). Explore our Virtual Datacenter Plans or reach out to Servers Are Up Support.

Was this article helpful?

On this page

What you will have at the endBefore you startSteps1. Export kubeconfig over an SSH tunnel or private VPN2. Create a dedicated namespace and non-root Deployment manifest3. Install cert-manager and expose the Service via Traefik IngressCheck that it worksWhat can go wrongGood practiceWhere to go next