sassoftware / viya4-deployment

This project contains Ansible code that creates a baseline in an existing Kubernetes environment for use with the SAS Viya Platform, generates the manifest for an order, and then can also deploy that order into the Kubernetes environment specified.
Apache License 2.0
71 stars 64 forks source link

Error during Deployment: "metrics-server" version "5.11.7" not found #375

Closed Danbondarenkomv closed 11 months ago

Danbondarenkomv commented 1 year ago

Hi everyone,

I am trying to deploy Viya, but I get the error below.

Deployment command:

sudo docker run --rm \
--group-add root \
--user $(id -u):$(id -g) \
--volume /deployments:/data \
--volume /home/ec2-user/viya4-deployment/ansible-vars.yaml:/config/config \
--volume /home/ec2-user/viya4-iac-aws/terraform.tfstate:/config/tfstate \
--volume $HOME/.ssh/id_rsa:/config/jump_svr_private_key \
viya4-deployment --tags "baseline,viya,install"

The error I am getting:

TASK [baseline : Deploy metrics-server] ****************************************
fatal: [localhost]: FAILED! => changed=false
  command: /usr/local/bin/helm --version=5.11.7 --repo=https://charts.bitnami.com/bitnami/ show chart metrics-server
  msg: |-
    Failure when executing Helm command. Exited 1.
    stdout:
    stderr: Error: chart "metrics-server" version "5.11.7" not found in https://charts.bitnami.com/bitnami/ repository
  stderr: |-
    Error: chart "metrics-server" version "5.11.7" not found in https://charts.bitnami.com/bitnami/ repository
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

The Ansible summary:

PLAY RECAP *********************************************************************
localhost                  : ok=57   changed=4    unreachable=0    failed=1    skipped=38   rescued=0    ignored=0

Wednesday 18 January 2023  16:38:03 +0000 (0:00:01.838)       0:00:17.410 *****
===============================================================================
baseline : Deploy metrics-server ---------------------------------------- 1.84s
jump-server : jump-server - lookup groups ------------------------------- 1.32s
baseline : Check for metrics service ------------------------------------ 1.01s
baseline : Retreive K8s cluster information ----------------------------- 0.99s
jump-server : jump-server - create folders ------------------------------ 0.97s
baseline : Remove deprecated efs-provisioner namespace ------------------ 0.96s
baseline : Retrieve K8s cluster information ----------------------------- 0.88s
Gathering Facts --------------------------------------------------------- 0.86s
baseline : Retreive K8s cluster information ----------------------------- 0.83s
baseline : Deploy ingress-nginx ----------------------------------------- 0.70s
baseline : Deploy ebs-csi-driver ---------------------------------------- 0.68s
common : tfstate - export kubeconfig ------------------------------------ 0.67s
baseline : Deploy nfs-subdir-external-provisioner ----------------------- 0.67s
baseline : Deploy cluster-autoscaler ------------------------------------ 0.58s
baseline : Remove deprecated nfs-client-provisioner --------------------- 0.41s
global tmp dir ---------------------------------------------------------- 0.34s
baseline : Remove deprecated efs-provisioner ---------------------------- 0.30s
baseline role install --------------------------------------------------- 0.10s
jump-server role -------------------------------------------------------- 0.08s
common : Load config file ----------------------------------------------- 0.07s

I have previously provisioned the AWS infrastructure for the deployment using Terraform using this project https://github.com/sassoftware/viya4-iac-aws, and I am deploying Viya on that infrastructure.

Would anyone be able to help me resolve this error?

Thank you

momiji commented 1 year ago

I think last chart version is 3.8.3 (check here: https://artifacthub.io/packages/helm/metrics-server/metrics-server). But it does not work well if kubernetes version is < 1.25 - https://github.com/kubernetes-sigs/metrics-server/issues/1141. In that case use chart version 3.7.0.

Danbondarenkomv commented 1 year ago

Hi @momiji I changed the variable METRICS_SERVER_CHART_VERSION to use version 3.7.0, but it still can't find it: image

Danbondarenkomv commented 1 year ago

Hi again @momiji I managed to resolve the issue. The deployment was getting the chart version from here https://artifacthub.io/packages/helm/bitnami/metrics-server, so the latest chart version there is 6.2.6. I have set the METRICS_SERVER_CHART_VERSION variable to the default value suggested here https://github.com/sassoftware/viya4-deployment/blob/main/docs/CONFIG-VARS.md#cert-manager which is 6.2.4 and then that allowed me to resolve the error.

Thank you

momiji commented 1 year ago

Great to hear it works, I didn't thought it was a bitnami chart, but you figured it out. Beware the constraint on the application version, that must not be 0.6.* so far, if you have a kubernetes 1.23 like me, unless the bitnami chart has a specific option that solves the issue, of course. I'll try this chart on our platform to see if the issue is still there.

riragh commented 11 months ago

Based on last comment, user managed to resolve this issue.