๐ŸŽฏ ืžื˜ืจืช ื”ืชืจื’ื•ืœ

ื‘ืžืขื‘ื“ื” ื–ื• ื ืœืžื“ ื›ื™ืฆื“ ืœืชืงืฉืจ ืขื Service ืฉื ืžืฆื ื‘-Namespace ืื—ืจ, ื•ื ืจืื”:


ื—ืœืง 1 โ€” ื™ืฆื™ืจืช Service ื‘ืชื•ืš Namespace dev

ื ื™ืฆื•ืจ ืงื•ื‘ืฅ ื—ื“ืฉ:

vi color-api-service.yaml

ื”ื“ื‘ืง:

apiVersion: v1
kind: Service
metadata:
  name: color-api
  namespace: dev
  labels:
    app: color-api
spec:
  type: ClusterIP
  selector:
    app: color-api
  ports:
    - port: 80
      targetPort: 80

ื”ืกื‘ืจ

ื”ืฉื™ืจื•ืช ื™ืคื ื” ืืช ื”ืชืขื‘ื•ืจื” ืœ-Pod ื‘ืชื•ืš dev.


ื—ืœืง 2 โ€” ื™ืฆื™ืจืช Traffic Generator ื‘-default Namespace