Well that is the root cause, but I went beyind that by manually bypassing some checks
slightly modified cnc-installation.yaml
- name: Report Internet Connection status
failed_when: "connection.status == -1"
debug:
msg: "Internet Connection status {{ connection.status }}"
- name: Install Internet Speed dependencies
when: connection.status != '-1'
become: true
apt:
name: ['speedtest-cli']
state: present
update_cache: yes
- name: Check Internet Speed
ignore_errors: true
failed_when: false
shell: speedtest-cli --simple
register: speed
- name: Report Valid Internet Speed
shell: echo {{ speed.stdout_lines[1] }} | awk '{print $3}'
register: speedtest
ignore_errors: true
failed_when: "'Kbit/s' in speedtest.stdout"
- name: Check DNS Configuration
shell: dig google.com +cmd +noall +answer
register: dns
failed_when: "dns.stdout | length < 0"
- name: Check Google Repo access
register: google_repo
failed_when: "google_repo.status != 200"
uri:
url: https://cloud.google.com/artifact-registry/
timeout: 5
and in cnc_values you might have
## Kubernetes apt resources
k8s_apt_key: "https://packages.cloud.google.com/apt/doc/apt-key.gpg"
k8s_apt_repository: "deb https://apt.kubernetes.io/ kubernetes-xenial main"
k8s_registry: "k8s.gcr.io"
even though you may have the key there the packages seem to be not there
That is when i tried to investigate (omit the playbook adding of repos, do it myself and let the playbook do the installation)
the is topic suggests we add trhe keys manually
in the lines below you can see that in the community repos a 1.24 key exists and i can update the debs for that
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.23/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
File '/etc/apt/keyrings/kubernetes-apt-keyring.gpg' exists. Overwrite? (y/N) curl: (22) The requested URL returned error: 403
y
gpg: no valid OpenPGP data found.
g@gsrv:~$ curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.24/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
File '/etc/apt/keyrings/kubernetes-apt-keyring.gpg' exists. Overwrite? (y/N) y
this is the same guidance in the official repo migration documentation.
in the sources list i have the problematic line
deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main
the next logical solutuon seems to be adding the line (if we forget the fact thetre was no key for 1.23 for a bit)
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.23/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list
however if we do an update, we get
sudo apt update
Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://gb.archive.ubuntu.com/ubuntu focal-security InRelease
Err:5 https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.23/deb InRelease
403 Forbidden [IP: 18.164.68.17 443]
Reading package lists... Done
E: Failed to fetch https://pkgs.k8s.io/core:/stable:/v1.23/deb/InRelease 403 Forbidden [IP: 18.164.68.17 443]
E: The repository 'https://pkgs.k8s.io/core:/stable:/v1.23/deb InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
we can also see that 1.23 is being got rof from this thread in the kubernetes github repo.
So I thought why not if I could try 1.24!!
so I changed my /etc/apt/sources.list.d/kubernetes.list
to have the line
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.24/deb/ /
and if I do an apt update I get no problems like before
sudo apt update
Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://gb.archive.ubuntu.com/ubuntu focal-security InRelease
Get:5 https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.24/deb InRelease [1,192 B]
Get:6 https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.24/deb Packages [26.5 kB]
Fetched 27.7 kB in 1s (28.4 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
31 packages can be upgraded. Run 'apt list --upgradable' to see them.
So what I am getting to here is,
- somehow people in k8 in heir infinite wisdom has decided to get rid of 1.23
- however we can still get 1.24
then comes my question, which is Iccan bypas the cheking steps as shown above in the top , maks sure the conditions for v1.24 is manually set by doing stuff below.
- getting the keys
- updating the
/etc/apt/sources.list.d/kubernetes.list
tp point to v1.24
- running apt update to make sure when i run the commands to instll k8 1.24 (or ansible does that) it is there toi be installed
then the actual question is.
by changing cnc_version: 6.1
to 7.0 or manually bodging the lines
- name: Install kubernetes components for Ubuntu on NVIDIA Cloud Native Core 6.1
become: true
when: "cnc_version == 6.1 and ansible_distribution == 'Ubuntu' and 'running' not in k8sup.stdout"
apt:
name: ['apt-transport-https', 'curl', 'ca-certificates', 'gnupg-agent' ,'software-properties-common', 'kubelet=1.23.5-00', 'kubeadm=1.23.5-00', 'kubectl=1.23.5-00']
state: present
update_cache: true
we can install 1.24!
Can you check if this is advidable or will this break TAO please.
Cheers,
Ganindu.