mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-07-11 07:22:15 +00:00
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
# Example kportal configuration
|
|
# Copy this file to your project and customize as needed
|
|
|
|
contexts:
|
|
# Production context
|
|
- name: production
|
|
namespaces:
|
|
- name: default
|
|
forwards:
|
|
# Forward to API service
|
|
- resource: service/api
|
|
protocol: tcp
|
|
port: 8080
|
|
localPort: 8080
|
|
alias: prod-api
|
|
|
|
# Forward to PostgreSQL database
|
|
- resource: service/postgres
|
|
protocol: tcp
|
|
port: 5432
|
|
localPort: 5432
|
|
alias: prod-db
|
|
|
|
- name: monitoring
|
|
forwards:
|
|
# Forward to Prometheus using label selector
|
|
- resource: pod
|
|
selector: app=prometheus
|
|
protocol: tcp
|
|
port: 9090
|
|
localPort: 9090
|
|
alias: prometheus
|
|
|
|
# Staging context
|
|
- name: staging
|
|
namespaces:
|
|
- name: default
|
|
forwards:
|
|
# Forward to staging app (prefix matching handles pod restarts)
|
|
- resource: pod/myapp
|
|
protocol: tcp
|
|
port: 8080
|
|
localPort: 8081
|
|
alias: staging-http
|
|
|
|
# Forward multiple ports from same pod
|
|
- resource: pod/myapp
|
|
protocol: tcp
|
|
port: 9090
|
|
localPort: 9091
|
|
alias: staging-metrics
|