helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

[victoria-metrics-k8s-stack] No resources other than services deployed

Open Poweranimal opened this issue 4 years ago • 4 comments

Hi there,

The victoria-metrics-k8s-stack does only create crds and services in the namespace kube-system but doesn't create any pods in the target namespace.

Steps to reproduce

helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add vm https://victoriametrics.github.io/helm-charts
helm show values vm/victoria-metrics-k8s-stack > values.yaml
helm install release vm/victoria-metrics-k8s-stack -f values.yaml -n monitoring

Helm Version version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"clean", GoVersion:"go1.15.11"}

Kubectl Version Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-12T14:18:45Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:20:00Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

Poweranimal avatar May 25 '21 17:05 Poweranimal

Hello, k8s-stack creates endpoints and service for system components, like etcd/kube-scheduler etc at kube-system namespace. Pods must be create at monitoring namespace according to your helm install command.

f41gh7 avatar May 26 '21 07:05 f41gh7

There seem to be multiple issues with the helm chart.

Prerequisites:

minikube start --cpus=32 --memory=48g --driver=kvm2
kubectl create namespace monitoring
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add vm https://victoriametrics.github.io/helm-charts
helm show values vm/victoria-metrics-k8s-stack > values.yaml
  1. Run helm install debug vm/victoria-metrics-k8s-stack -f values.yaml -n monitoring Causes error: Error: template: victoria-metrics-k8s-stack/templates/servicemonitors/grafana.yaml:15:20: executing "victoria-metrics-k8s-stack/templates/servicemonitors/grafana.yaml" at <.Values.grafana.service.portName>: nil pointer evaluating interface {}.portName

  2. Added following entry to values.yaml: grafana.service.portName: 80

  3. Run helm install debug vm/victoria-metrics-k8s-stack -f values.yaml -n monitoring Causes error: Error: YAML parse error on victoria-metrics-k8s-stack/templates/grafana/datasource.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key

  4. Add following entry to values.yaml to disable grafana completly, because it doesn't work. grafana.enabled: false

  5. Run helm install debug vm/victoria-metrics-k8s-stack -f values.yaml -n monitoring Success.

    NAME: debug
    LAST DEPLOYED: Thu May 27 16:38:34 2021
    NAMESPACE: monitoring
    STATUS: deployed
    REVISION: 1
    TEST SUITE: None
    
  6. Check if any pods have been deployed: kubectl -n monitoring get pod No resources found in monitoring namespace.

  7. Check if anything has been deployed: kubectl get all -A

    NAMESPACE     NAME                                   READY   STATUS    RESTARTS   AGE
    kube-system   pod/coredns-74ff55c5b-nc7t6            1/1     Running   0          11m
    kube-system   pod/etcd-minikube                      1/1     Running   0          11m
    kube-system   pod/kube-apiserver-minikube            1/1     Running   0          11m
    kube-system   pod/kube-controller-manager-minikube   1/1     Running   0          11m
    kube-system   pod/kube-proxy-rf5d8                   1/1     Running   0          11m
    kube-system   pod/kube-scheduler-minikube            1/1     Running   0          11m
    kube-system   pod/storage-provisioner                1/1     Running   2          11m
    
    NAMESPACE     NAME                                                               TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)                      AGE
    default       service/kubernetes                                                 ClusterIP   10.96.0.1    <none>        443/TCP                  11m
    kube-system   service/debug-victoria-metrics-k8s-stack-coredns                   ClusterIP   None         <none>        9153/TCP                 11m
    kube-system   service/debug-victoria-metrics-k8s-stack-kube-controller-manager   ClusterIP   None         <none>        10252/TCP                11m
    kube-system   service/debug-victoria-metrics-k8s-stack-kube-etcd                 ClusterIP   None         <none>        2379/TCP                 11m
    kube-system   service/debug-victoria-metrics-k8s-stack-kube-scheduler            ClusterIP   None         <none>        10251/TCP                11m
    kube-system   service/kube-dns                                                   ClusterIP   10.96.0.10   <none>        53/UDP,53/TCP,9153/TCP   11m
    
    NAMESPACE     NAME                        DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR            AGE
    kube-system   daemonset.apps/kube-proxy   1         1         1       1            1           kubernetes.io/os=linux   11m
    
    NAMESPACE     NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
    kube-system   deployment.apps/coredns   1/1     1            1           11m
    
    NAMESPACE     NAME                                DESIRED   CURRENT   READY   AGE
    kube-system   replicaset.apps/coredns-74ff55c5b   1         1         1       11m
    

Poweranimal avatar May 27 '21 14:05 Poweranimal

Sorry, it was broken during latest release.

Thanks for detailed report, must be fixed now.

f41gh7 avatar May 29 '21 03:05 f41gh7

@Poweranimal can you try helm repo update and then install again, with grafana

k1rk avatar May 29 '21 05:05 k1rk