apiVersion: apps/v1
kind: Deployment
metadata:
  name: videos-web
  labels:
    app: videos-web
spec:
  selector:
    matchLabels:
      app: videos-web
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  template:
    metadata:
      labels:
        app: videos-web
    spec:
      containers:
      - name: videos-web
        image: aimvector/jaeger-tracing:videos-web-1.0.0
        imagePullPolicy : Always
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: videos-web
  labels:
    app: videos-web
spec:
  type: ClusterIP
  selector:
    app: videos-web
  ports:
    - protocol: TCP
      name: http
      port: 80
      targetPort: 80
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/rewrite-target: /$2
  name: videos-web
spec:
  rules:
  - host: tracing.demo
    http:
      paths:
      - path: /home(/|$)(.*)
        backend:
          serviceName: videos-web
          servicePort: 80

