当前位置:   article > 正文

k8s helm 安装prometheus-kafka-exporter 遇到问题_function "lookup" not defined

function "lookup" not defined
[root@hadoop03 helm]# helm install --name kafk-exporter /opt/module/k8s/helm/prometheus-kafka-exporter
Error: parse error in "prometheus-kafka-exporter/charts/kafka/charts/common/templates/_secrets.tpl": template: prometheus-kafka-exporter/charts/kafka/charts/common/templates/_secrets.tpl:84: function "lookup" not defined
[root@hadoop03 helm]#
  • 1
  • 2
  • 3

在这里插入图片描述

参考:https://stackoverflow.com/questions/66029873/microk8s-helm3-function-lookup-not-defined
在这里插入图片描述


### 现在安装的是helm ###
[root@hadoop03 helm]# helm version
Client: &version.Version{SemVer:"v2.12.2", GitCommit:"7d2b0c73d734f6586ed222a567c5d103fed435be", GitTreeState:"clean"}
[root@hadoop03 helm]#
[root@hadoop03 helm]# ll
total 35728
-rw-r--r-- 1 root root 22724805 2021-12-04 17:03:10 helm-v2.12.2-linux-amd64.tar.gz
-rw-r--r-- 1 root root 13702117 2021-12-07 17:24:42 helm-v3.6.3-linux-amd64.tar.gz
drwxr-xr-x 2 3434 3434       78 2021-12-07 17:33:46 linux-amd64
-rw-r--r-- 1 root root     1487 2021-12-04 21:11:21 tiller.yaml
[root@hadoop03 helm]#
[root@hadoop03 linux-amd64]# helm init --output yaml > tiller.yaml
### 修改tiller镜像 ###
[root@hadoop03 linux-amd64]# cat tiller.yaml | grep image
        image: luutqf/kubernetes-helm-tiller:v2.12.2
        imagePullPolicy: IfNotPresent

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

在这里插入图片描述

[root@hadoop03 linux-amd64]# cat tiller.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: helm
    name: tiller
  name: tiller-deploy
  namespace: kube-system
spec:
  replicas: 1
  strategy: {}
  selector:
    matchLabels:
      app: helm
      name: tiller
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: helm
        name: tiller
    spec:
      automountServiceAccountToken: true
      containers:
      - env:
        - name: TILLER_NAMESPACE
          value: kube-system
        - name: TILLER_HISTORY_MAX
          value: "0"
        image: luutqf/kubernetes-helm-tiller:v2.12.2
        imagePullPolicy: IfNotPresent
        livenessProbe:
          httpGet:
            path: /liveness
            port: 44135
          initialDelaySeconds: 1
          timeoutSeconds: 1
        name: tiller
        ports:
        - containerPort: 44134
          name: tiller
        - containerPort: 44135
          name: http
        readinessProbe:
          httpGet:
            path: /readiness
            port: 44135
          initialDelaySeconds: 1
          timeoutSeconds: 1
        resources: {}
status: {}

---
apiVersion: v1
kind: Service
metadata:
  creationTimestamp: null
  labels:
    app: helm
    name: tiller
  name: tiller-deploy
  namespace: kube-system
spec:
  ports:
  - name: tiller
    port: 44134
    targetPort: tiller
  selector:
    app: helm
    name: tiller
  type: ClusterIP
status:
  loadBalancer: {}

...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
[root@hadoop03 helm]# kubectl apply -f tiller.yaml

[root@hadoop03 helm]# helm version
version.BuildInfo{Version:"v3.6.3", GitCommit:"d506314abfb5d21419df8c7e7e68012379db2354", GitTreeState:"clean", GoVersion:"go1.16.5"}
[root@hadoop03 helm]# helm list
NAME                            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                           APP VERSION
prometheus-kafka-exporter       default         1               2021-12-07 17:52:20.477767297 +0800 CST deployed        prometheus-kafka-exporter-1.5.0 v1.4.1

### 再次安装 ###
helm install --name-template=prometheus-kafka-exporter `pwd`/prometheus-kafka-exporter
[root@hadoop03 helm]# helm list
NAME                            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                           APP VERSION
prometheus-kafka-exporter       default         1               2021-12-07 17:52:20.477767297 +0800 CST deployed        prometheus-kafka-exporter-1.5.0 v1.4.1
[root@hadoop03 helm]#
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/678808
推荐阅读
相关标签
  

闽ICP备14008679号