HollaEx®
⚙️ DashboardStart →
  • HollaEx® — The Crypto Exchange Solution
  • ☁️Cloud Operators
    • Launching the Exchange
    • Setting Domain for Cloud Exchanges
    • Easy SMTP for Cloud Exchanges
    • SEO Settings for Cloud Exchanges
      • SEO Advanced Settings
  • ⚙️Operating Your Exchange
    • Operator Control Panel
      • General
      • Users
      • User Profile
      • Assets
      • Markets
      • Stakes
      • Sessions
      • Plugins Apps
      • Trading Fees & Account Tiers
      • Roles
      • Chat
      • Billing
    • Customize Exchange
      • Browser Tools
        • Enter Edit Mode
        • Operator Controls (Visuals)
        • Console
      • Plugins
      • Forked Repo
    • Fiat Controls
      • Initial Setup
      • Setting Up Fiat On/ Off Ramp
      • Editing Deposit & Withdrawal Fees
      • Users Making Fiat Deposit
      • Users Trading With Fiat
      • User Making Fiat Withdrawal
    • Staking
    • OTC Broker
    • P2P
      • P2P Overview
      • P2P Setup
      • P2P Troubleshooting
      • P2P Vendor Flow
    • Smart Chain Trading
    • Assets & Trading Pairs
      • Add New Assets & Trading Pairs
      • Configure Pair Parameters
    • Set up the SMTP Email
      • Set up SMTP with AWS SES
      • Set up SMTP with Mailgun
      • Set up SMTP with SendGrid
      • Test the SMTP with Gmail
    • Enabling reCAPTCHA
    • Email Customization & Audit
    • DeFi Asset Staking Process
  • 🧩Plugins
    • HollaEx Plugins
      • Announcements
      • Bank
      • AWS SNS (Text Messages - SMS)
      • KYC
      • Automatic KYC
      • Messente
      • Advanced Referral
      • CoinMarketCap
      • Guardarian
    • Install Plugins
    • Developing Plugins
      • Development Walkthrough: Hello-Plugin
        • Initialization
        • Configuration
        • Scripting
        • Web View
        • The Final Product & Installation
      • Advanced
        • Initialization
        • Config
        • Server Script
        • Plugin Libraries
        • Web View
        • Final Plugin Product
        • Advanced Tutorial: Using the user meta field
        • Advanced Tutorial: Adding a new database table column
        • Advanced Tutorial: Creating a new database table
      • Simple Wallet Example
      • Web View Development
        • Overview
        • External dependencies
        • Getting started
        • Basic Tutorial: Hello Exchange Plugin web view
        • Advanced Tutorial: KYC Plugin web views
    • Bank Integration
      • Handling Deposits
      • Handling Withdrawals
  • 👷Developers
    • API Guide
      • API Example Scripts
    • Run Dev Mode
    • Build a New Front-end Interface
  • 🧰On-Premise Operators (Advanced Only)
    • On-Premise Exchange Setup
      • Getting Started — Requirements
      • Installation
      • Server Setup
      • Web Setup
      • Production
    • CLI How-Tos
      • Start Exchange
      • Stop Exchange
      • Upgrade Exchange
        • Build and Apply the Code Changes
      • Get Exchange Logs
      • Get a Backup and Restore
      • Exchange Migration
      • Command List
    • Run Exchange on Kubernetes
    • Troubleshooting Guide
  • 🚀Advanced
    • SEO Optimization
    • Nginx
    • Rate Limits
    • Database
      • Upgrade Database
    • Dependencies
    • Contents Delivery Network
      • Cloudflare CDN for HollaEx
      • CloudFront CDN for HollaEx
    • Load Balancer
      • AWS ELB
      • DigitalOcean LB
    • Customize Kubenretes Ingress
    • Exchange Keys
      • Exchange API Keys Troubleshoot
    • HollaEx on non-Linux
      • HollaEx on Windows
      • HollaEx on macOS
    • The Network Tool Library
      • Accessing the Network Tool Library
      • Functions
        • WebSocket
      • Simple Example: Creating a User and Wallet
      • Getting More Interesting: Orders with the Tools
        • Setup: Using the transferAsset function
        • Creating and Monitoring a Sell Order
        • Settling Fees
      • Private HollaEx Network
    • Docker Content Trust (DCT)
    • Revenue Sharing
  • 📦Releases
    • Release Notes
    • Side Notes
  • ➡️External Links
  • Blogs
  • Forum
  • Videos
  • Twitter X
  • Telegram
  • Interactive Demo
  • Discord Community
  • API Documentation
  • Tools Library Documentation
  • Node Library Documentation
  • Plugins Documentation
Powered by GitBook
On this page
  1. Advanced

Customize Kubenretes Ingress

PreviousDigitalOcean LBNextExchange Keys

Last updated 2 years ago

Customizing Ingress rules for exchanges on Kubernetes

Once you run HollaEx CLI commands with --kube flag, HollaEx CLI will automatically generate Ingress rules for Kubernetes with a default form. You can check these generated templates under templates/kubernetes/<EXCHANGE_NAME>-ingress.yaml> .

Default Ingress should be similar to the examples down below.

The HollaEx CLI generates Ingress rules which compatible with .If you are planning to use a different Ingress controller, please customize annotations and detailed values based on your own ones.

Nginx rate limit setups on nginx.ingress.kubernetes.io/configuration-snippet are following pre-defined rate limit zone setups on HollaEx's own Ingress controller.

  • api : 4r/s

Please reference these values and add them to your own Ingress controller. For example, kubernetes/nginx-ingress support annotation called http-snippet to let users inject code snippets on Nginx.conf.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo-hollaex-ingress-api
  namespace: demo-hollaex
  annotations:
    kubernetes.io/ingress.class: "nginx"
    kubernetes.io/tls-acme: "true"
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/proxy-body-size: "6m"
    nginx.ingress.kubernetes.io/server-snippet: |
        location @maintenance_503 {
          internal;
          return 503;
        }
    nginx.ingress.kubernetes.io/configuration-snippet: |
      limit_req zone=api burst=10 nodelay;
      limit_req_log_level notice;
      limit_req_status 429;

      #error_page 403 @maintenance_503;

spec:
  rules:
  - host: api.testnet.demo-hollaex.io
    http:
      paths:
      - pathType: Prefix
        path: /
        backend:
          service:
            name: demo-hollaex-server-api
            port:
              number: 10010
  
  tls:
  - secretName: demo-hollaex-tls-cert
    hosts:
    - api.testnet.demo-hollaex.io
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo-hollaex-ingress-plugins
  namespace: demo-hollaex
  annotations:
    kubernetes.io/ingress.class: "nginx"
    kubernetes.io/tls-acme: "true"
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/server-snippet: |
        location @maintenance_503 {
          internal;
          return 503;
        }
    nginx.ingress.kubernetes.io/proxy-body-size: "6m"
    nginx.ingress.kubernetes.io/configuration-snippet: |
      #error_page 403 @maintenance_503;

spec:
  rules:
  - host: api.testnet.demo-hollaex.io
    http:
      paths:
      - pathType: Prefix
        path: /plugins
        backend:
          service:
            name: demo-hollaex-server-plugins
            port:
              number: 10011
    
  
  tls:
  - secretName: demo-hollaex-tls-cert
    hosts:
    - api.testnet.demo-hollaex.io

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo-hollaex-ingress-stream
  namespace: demo-hollaex
  annotations:
    kubernetes.io/ingress.class: "nginx"
    kubernetes.io/tls-acme: "true"
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/server-snippet: |
        location @maintenance_503 {
          internal;
          return 503;
        }
    nginx.ingress.kubernetes.io/proxy-body-size: "6m"
    nginx.org/websocket-services: "demo-hollaex-server-stream"
    nginx.ingress.kubernetes.io/upstream-hash-by: "$binary_remote_addr"
    nginx.ingress.kubernetes.io/configuration-snippet: |
      #error_page 403 @maintenance_503;
spec:
  rules:
  - host: api.testnet.demo-hollaex.io
    http:
      paths:
      - pathType: Prefix
        path: /stream
        backend:
          service:
            name: demo-hollaex-server-stream
            port:
              number: 10080
  
  
  tls:
  - secretName: demo-hollaex-tls-cert
    hosts:
    - api.testnet.demo-hollaex.io

Guide for the nginxinc/kubernetes-ingress users.

If you are planning to use nginxinc/kubernetes-ingress, certain annotations should be modified as shown below.

If you are planning to use split Ingress rules like the example above, Consider using nginx.org/mergeable-ingress-type.

  • nginx.ingress.kubernetes.io/proxy-body-size-> nginx.org/client-max-body-size

  • nginx.ingress.kubernetes.io/configuration-snippet -> nginx.org/location-snippets

🚀
kubernetes/nginx-ingress