kubernetes jaeger deploy returns unknown field "template"

8/18/2021

The phrase "unknown field template" appears when Kubernetes tries to create a jaeger deployment.

jaeger deployment yaml

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: simple-prod
  labels:
    app: jaeger
spec:
  strategy: production
  collector:
    maxReplicas: 5
    resources:
      limits:
        cpu: 100m
        memory: 128Mi
  template:
    metadata:
      labels:
        app: jaeger
    spec:
      containers:
      - name: jaeger
        env:
        - name: SPAN_STORAGE_TYPE
          value: elasticsearch
        - name: ES_SERVER_URLS
          value: http://elasticsearch:9200
        - name: ES_TAGS_AS_FIELDS_ALL
          value: true          
        ports:
        - containerPort: 16686

I don't know where it went wrong...

-- Kim sung
deployment
jaeger
kubernetes

1 Answer

8/18/2021

There could be any reason for failing due to missing fields or selector inside the template

or the API version you are using wont work without CRD : apiVersion: jaegertracing.io/v1

This is official YAML of the jaeger you can checkout once : https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml

You can check the official document to install the jaeger on Kubernetes: https://www.jaegertracing.io/docs/1.25/operator/

-- Harsh Manvar
Source: StackOverflow