ibuildthecloud / k3v

Virtual Kubernetes
Apache License 2.0
684 stars 28 forks source link

[question] Whether the officially released will be dynamically linked? #1

Closed warmchang closed 5 years ago

warmchang commented 5 years ago

@ibuildthecloud first of all thank you & rancher for the k3x series (k3s, k3os, k3d, k3v), they are great! :100:

I can't wait to try the first release, but it failed to run on Ubuntu 18.04.2 (caused by glibc version):

$ k3v
k3v: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by k3v)
$
$ uname -a
Linux minikube 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
$
$ ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
$

So I can build it on my local env or just upgrade the glibc so that k3v runs well:

$ ./k3v
INFO[0000] Starting controller
INFO[0000] Starting k3s
INFO[0000] Running kube-apiserver --tls-cert-file=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/serving-kube-apiserver.crt --api-audiences=unknown --kubelet-client-certificate=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/client-kube-apiserver.crt --requestheader-allowed-names=system:auth-proxy --service-account-signing-key-file=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/service.key --service-cluster-ip-range=10.45.0.0/16 --secure-port=6444 --bind-address=127.0.0.1 --requestheader-username-headers=X-Remote-User --enable-admission-plugins=NodeRestriction --proxy-client-key-file=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/client-auth-proxy.key --requestheader-extra-headers-prefix=X-Remote-Extra- --cert-dir=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/temporary-certs --insecure-port=0 --basic-auth-file=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/cred/passwd --proxy-client-cert-file=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/client-auth-proxy.crt --kubelet-client-key=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/client-kube-apiserver.key --requestheader-client-ca-file=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/request-header-ca.crt --allow-privileged=true --advertise-port=7443 --tls-private-key-file=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/serving-kube-apiserver.key --service-account-key-file=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/service.key --authorization-mode=Node,RBAC --service-account-issuer=k3s --requestheader-group-headers=X-Remote-Group --client-ca-file=/root/go/src/github.com/rancher/k3v/k3v-data/server/k3v-data/server/tls/client-ca.crt
......

But I suggest to statically build the binary (just like the k3s), so that it can be more compatible with the diffrent OSs.

ibuildthecloud commented 5 years ago

The official release will be statically linked like k3s. I haven't put any effort into properly packaging this for user consumption yet. So right now I'm just publishing the code to prove it's possible. Based on interest we'll take this further and make it easier to use.