twgis

cluster: mbk8s-dev

Endpoints

Wildcard
*.twgis.mapboss.co.th
Raw TCP
192.168.64.221 : 33020-33039
Namespaces
twgis (admin)
Default namespace
twgis

Deploy a web app

Ingress อยู่ใน namespace twgis ใช้ TLS secret twgis-tls. IP จริงของผู้ใช้อยู่ใน header X-Forwarded-For (ไม่ใช่ remote_addr) เพราะ edge ใช้ PROXY protocol. ⚠️ image ต้องเป็น arm64 (cluster เป็น Apple Silicon; amd64 อย่างเดียวจะ exec format error).

apiVersion: apps/v1
kind: Deployment
metadata: { name: myapp, namespace: twgis }
spec:
  replicas: 2
  selector: { matchLabels: { app: myapp } }
  template:
    metadata: { labels: { app: myapp } }
    spec:
      containers:
        - name: app
          image: your-image:tag
          ports: [{ containerPort: 8080 }]
---
apiVersion: v1
kind: Service
metadata: { name: myapp, namespace: twgis }
spec:
  selector: { app: myapp }
  ports: [{ port: 80, targetPort: 8080 }]
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata: { name: myapp, namespace: twgis }
spec:
  ingressClassName: nginx
  tls: [{ hosts: ["twgis.mapboss.co.th"], secretName: twgis-tls }]
  rules:
    - host: twgis.mapboss.co.th
      http: { paths: [{ path: /, pathType: Prefix,
              backend: { service: { name: myapp, port: { number: 80 } } } }] }

Expose a raw-TCP service

ใช้ port ในช่วง 33020-33039 บน IP 192.168.64.221. หลาย service ใช้ IP เดียวกันได้ผ่าน allow-shared-ip คนละ port — apply แล้วเข้าถึงได้เลย. ถ้าต้องการ port นอกช่วงนี้ ติดต่อทีม platform.

apiVersion: v1
kind: Service
metadata:
  name: myapp-tcp
  namespace: twgis
  annotations:
    metallb.universe.tf/loadBalancerIPs: "192.168.64.221"
    metallb.universe.tf/allow-shared-ip: "twgis"
spec:
  type: LoadBalancer
  selector: { app: myapp }
  ports: [{ port: 33020, targetPort: 6379 }]

Persistent storage

ต้องการ persistent volume → ใช้ storageClassName: nfs-tb

apiVersion: v1
kind: PersistentVolumeClaim
metadata: { name: data, namespace: twgis }
spec:
  accessModes: [ReadWriteOnce]
  storageClassName: nfs-tb
  resources: { requests: { storage: 5Gi } }

Access & permissions

kubeconfig ทีม platform ส่งให้แยกต่างหาก (มี token ไม่หมดอายุ — เก็บเป็นความลับ). Default namespace: twgis.

  • เป็น admin เต็มสิทธิ์ใน namespace ของคุณ: twgis
  • เห็นได้แค่ ชื่อ ของ namespace ทั้ง cluster (ให้ Lens/k9s/ArgoCD เปิดได้) แต่อ่าน namespace อื่นไม่ได้
  • ไม่มีสิทธิ์ระดับ cluster และไม่มีสิทธิ์นอก namespace ของคุณ
  • TLS secret twgis-tls (wildcard) มีเฉพาะใน namespace twgis — Ingress ที่จะใช้ต้องอยู่ที่นี่

Request debug

this request
Served by pod
mbk8s-welcome-bb7f5d674-6knns
Your IP (XFF)
216.73.216.55
Source addr
10.244.0.27
Host
twgis.mapboss.co.th
Proto
https
Method
GET
Time
2026-07-01T13:07:31+00:00
User-Agent
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
หน้า onboarding ของ mbk8s (deploy อัตโนมัติ) — แทนที่ด้วย app ของคุณได้. ลบ: kubectl -n twgis delete deploy,svc,ingress,cm -l app=mbk8s-welcome