Docs / Kubernetes & Orchestration / Setting Up Kubernetes Ingress with Traefik

Setting Up Kubernetes Ingress with Traefik

By Admin · Jan 24, 2026 · Updated Apr 24, 2026 · 5 views · 3 min read

This guide covers how to set up and configure ingress on a Linux VPS. Whether you're running a production environment or a development setup, these instructions will help you get started quickly and securely.

Deploying the Application

Performance benchmarks show that properly tuned ingress can handle significantly more concurrent connections than the default configuration. The key improvements come from adjusting worker processes and connection pooling.


# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ingress-app
  labels:
    app: ingress
spec:
  replicas: 2
  selector:
    matchLabels:
      app: ingress
  template:
    metadata:
      labels:
        app: ingress
    spec:
      containers:
      - name: ingress
        image: ingress:latest
        ports:
        - containerPort: 8080
        resources:
          requests:
            memory: "128Mi"
            cpu: "250m"
          limits:
            memory: "256Mi"
            cpu: "500m"

This configuration provides a good balance between performance and resource usage. For high-traffic scenarios, you may need to increase the limits further.

Configuring Services and Ingress

Before making changes to the configuration, always create a backup of the existing files. This ensures you can quickly roll back if something goes wrong during the setup process.


# Apply the configuration
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml

# Verify the deployment
kubectl get pods -l app=ingress
kubectl describe deployment ingress-app
kubectl logs -f deployment/ingress-app

These commands should be run as root or with sudo privileges. If you're using a non-root user, prefix each command with sudo.

  • Test your backup restore procedure monthly
  • Review log files weekly for anomalies
  • Keep your system packages updated regularly
  • Monitor disk space usage and set up alerts
  • Enable automatic security updates for critical patches

Setting Up Persistent Storage

Performance benchmarks show that properly tuned ingress can handle significantly more concurrent connections than the default configuration. The key improvements come from adjusting worker processes and connection pooling.


# service.yaml
apiVersion: v1
kind: Service
metadata:
  name: ingress-service
spec:
  selector:
    app: ingress
  ports:
  - port: 80
    targetPort: 8080
  type: ClusterIP

The configuration above sets the recommended values for a VPS with 2-4GB of RAM. Adjust the memory-related settings proportionally if your server has different specifications.

Scaling and Resource Management

For production deployments, consider implementing high availability by running multiple instances behind a load balancer. This approach provides both redundancy and improved performance under heavy load.


# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ingress-app
  labels:
    app: ingress
spec:
  replicas: 2
  selector:
    matchLabels:
      app: ingress
  template:
    metadata:
      labels:
        app: ingress
    spec:
      containers:
      - name: ingress
        image: ingress:latest
        ports:
        - containerPort: 8080
        resources:
          requests:
            memory: "128Mi"
            cpu: "250m"
          limits:
            memory: "256Mi"
            cpu: "500m"

The configuration above sets the recommended values for a VPS with 2-4GB of RAM. Adjust the memory-related settings proportionally if your server has different specifications.

  • Keep all software components up to date
  • Set up fail2ban for brute force protection
  • Enable firewall and allow only necessary ports
  • Use strong, unique passwords for all services

Conclusion

This guide covered the essential steps for working with ingress on a VPS environment. For more advanced configurations, refer to the official documentation. Don't hesitate to reach out to our support team if you need help with your specific setup.

Was this article helpful?