The TLS connection was non-properly terminated in kubernetes

11/26/2020

I am doing an apt-get update for installing Kubernetes and I get this message https://packages.cloud.google.com/apt kubernetes-xenial Release Could not handshake: The TLS connection was non-properly terminated.

and ofcourse later in the process; ""The repository 'http://apt.kubernetes.io kubernetes-xenial Release' does not have a Release file"

I have the proxies set correctly:

1 in etc-apt-apt.conf.d -proxy.conf Acquire::ForceIPv4 "true"; and proxies are set for https_proxy; http_proxy and ftp_proxy

  1. and in **

etc conf I have disabled ipv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1

**

Can someone please help me understand what other proxies etc are missing to avoid the TLS error.

-- kapa3
kubernetes
ssl

1 Answer

11/30/2020

Solved the issue: This was an issue due to be being behind a firewall The apt-key before the apt-get update instruction was the issue

By rerunning the apt-key using "curl -sSL \ 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xBBEBDCB318AD50EC6865090613B00F1FD2C19886' \ | sudo apt-key add - "

instead of the original instruction curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

Full set of instructions 1. sudo apt-get update 2. sudo apt-get install docker.io 3. sudo apt-get update && sudo apt-get install -y apt-transport-https curl 4. curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add – 6. cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list 7. deb https://apt.kubernetes.io/ kubernetes-xenial main 8. EOF 9. sudo apt-get update:

-- kapa3
Source: StackOverflow