springboot-server.yaml 858 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: springboot-server
  5. #namespace: otel-demo
  6. labels:
  7. app: springboot-server
  8. spec:
  9. selector:
  10. app: springboot-server
  11. ports:
  12. - protocol: TCP
  13. port: 8080
  14. targetPort: 8080
  15. nodePort: 31010
  16. type: NodePort
  17. ---
  18. apiVersion: apps/v1
  19. kind: Deployment
  20. metadata:
  21. name: springboot-server
  22. #namespace: otel-demo
  23. spec:
  24. selector:
  25. matchLabels:
  26. app: springboot-server
  27. replicas: 1
  28. template:
  29. metadata:
  30. labels:
  31. app: springboot-server
  32. annotations:
  33. #sidecar.opentelemetry.io/inject: "true"
  34. instrumentation.opentelemetry.io/inject-java: "true"
  35. spec:
  36. containers:
  37. - name: app
  38. image: registry.cn-shenzhen.aliyuncs.com/lr_715377484/springboot-server
  39. ports:
  40. - containerPort: 8080
  41. protocol: TCP