728x90
반응형
1. deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: zipkin-deployment
labels:
env: production
tier: backend
app: zipkin
name: zipkin-deployment
spec:
replicas: 1
selector:
matchLabels:
env: production
tier: backend
app: zipkin
name: zipkin-pod
template:
metadata:
labels:
env: production
tier: backend
app: zipkin
name: zipkin-pod
spec:
containers:
- name: zipkin
image: openzipkin/zipkin
ports:
- containerPort: 9411
name: http-9411
env:
- name: TZ
valueFrom:
configMapKeyRef:
name: common-configmap
key: TZ
startupProbe:
httpGet:
path: /zipkin/
port: 9411
initialDelaySeconds: 10
periodSeconds: 5
successThreshold: 1
failureThreshold: 36
readinessProbe:
httpGet:
path: /zipkin/
port: 9411
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
2. service.yaml
apiVersion: v1
kind: Service
metadata:
name: zipkin
labels:
env: production
tier: backend
app: zipkin
name: zipkin-service
spec:
type: NodePort
selector:
env: production
tier: backend
app: zipkin
name: zipkin-pod
ports:
- name: http-9411
protocol: TCP
port: 9411
targetPort: 9411
nodePort: 30008
3. ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: zipkin-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
labels:
env: production
tier: backend
app: zipkin
name: zipkin-ingress
spec:
tls:
- hosts:
- zipkin.co.kr
secretName: tlssecret-zipkin
ingressClassName: nginx
rules:
- host: zipkin.co.kr
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: zipkin
port:
number: 9411
4. 적용
kubectl create -f deployment.yaml
kubectl create -f service.yaml
kubectl create -f ingress.yaml
5. 브라우저 확인
https://zipkin.co.kr:30200/zipkin/
728x90
반응형
'시스템 > 쿠버네티스' 카테고리의 다른 글
[쿠버네티스] MSA(7) TLS 인증서 생성 (0) | 2024.01.26 |
---|---|
[쿠버네티스] MSA(6) mysql db 설치 (0) | 2024.01.26 |
[쿠버네티스] MSA(4) configmap 생성 (0) | 2024.01.25 |
[쿠버네티스] MSA(3) 도메인별 시크릿 키 생성 (0) | 2024.01.25 |
[쿠버네티스] MSA(2) nfs공유폴더 설정 (0) | 2024.01.25 |
댓글