hystax / optscale

FinOps, MLOps and cloud cost optimization tool. Supports AWS, Azure, GCP, Alibaba Cloud and Kubernetes.
https://hystax.com
Apache License 2.0
1.18k stars 165 forks source link

Failed to update apt cache: E:The repository 'http://apt.kubernetes.io kubernetes-xenial Release' does not have a Release file #231

Closed vinothraj3 closed 6 months ago

vinothraj3 commented 6 months ago

Describe the bug unable to deploy optscale using quick start deployment guide and its failing while execute ansible play book to configure k8s and other stuff with below error

TASK [common : Add kubernetes repo] **** fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: E:The repository 'http://apt.kubernetes.io kubernetes-xenial Release' does not have a Release file."}

To Reproduce Steps to reproduce the behavior: just follow the instruction of QUICK START in README to install Optscale into any ubnutu 20.04 vm and its failing at this below step in that Quick start

Kuberenetes installation ansible-playbook -e "ansible_ssh_user=" -k -K -i "," ansible/k8s-master.yaml

Expected behavior Kubernetes suppose to be installed to proceed with Optscale deployment of below step

./runkube.py --with-elk -o overlay/user_template.yml --

Screenshots N/A

Desktop (please complete the following information):

Additional context As i see K8s 1.23 or below repo got removed from Kubernetes repo or other third party repo and that version is no longer supported as per below links which i referred

https://github.com/kubernetes/release/issues/3485 https://github.com/kubernetes/kubernetes/issues/123673

maxb-hystax commented 6 months ago

Thanks for the report, @vinothraj3!

We're on it, hope to deliver fix very soon.

maxb-hystax commented 6 months ago

Fixed with https://github.com/hystax/optscale/commit/31fbc893347be906ffc9d9f97a11ce965a54ffcc

Before new try, please reset existing k8s cluster

sudo kubeadm reset rm -rf ~/.kube sudo rm -rf /etc/kubernetes sudo rm -rf /var/lib/etcd/ echo "KUBELET_EXTRA_ARGS=" | sudo tee /etc/default/kubelet

vinothraj3 commented 6 months ago

Great ! Thanks for the quick fix , it worked.

XXXandr84 commented 6 months ago

Good afternoon , I did not quite understand how to solve the problem I install it through ansible so k8s_repo: "deb https://apt.kubernetes.io/ kubernetes-xenial main" And the same error comes out. Failed to update apt cache: E:The repository 'https://apt.kubernetes.io kubernetes-xenial Release' does not have a Release file. What should I do to get the installation started?

tm-hystax commented 5 months ago

@XXXandr84, hi!

Please follow these steps:

  1. Update to the latest version of OptScale
  2. Reset existing k8s cluster
    sudo kubeadm reset
    rm -rf ~/.kube
    sudo rm -rf /etc/kubernetes
    sudo rm -rf /var/lib/etcd/
    echo "KUBELET_EXTRA_ARGS=" | sudo tee /etc/default/kubelet
  3. Remove this file: sudo rm /etc/apt/sources.list.d/kubernetes.list

After that, please, try again!)