Package Details: kubernetes 1.13.3-1

Git Clone URL: https://aur.archlinux.org/kubernetes.git (read-only)
Package Base: kubernetes
Description: Production-Grade Container Scheduling and Management
Upstream URL: http://kubernetes.io/
Licenses: Apache
Submitter: irtimmer
Maintainer: irtimmer
Last Packager: irtimmer
Votes: 40
Popularity: 0.839478
First Submitted: 2015-05-29 17:48
Last Updated: 2019-02-04 21:32

Latest Comments

1 2 3 4 5 6 ... Next › Last »

NonerKao commented on 2019-01-11 09:26

I have done a patch to trim this package at: https://github.com/NonerKao/aur-kubernetes

With my patch, one can build the package without too much pain using the zram tricks easily, install, and then

# kubeadm init ... (according to your custom settings here)

DO NOT start kubelet service until kubeadm starts to complain about the health of :10248. This flow turns out to be perfect for me.

I am also considering expanding the wiki page. Details here: https://wiki.archlinux.org/index.php/Talk:Kubernetes

NonerKao commented on 2019-01-10 03:19

Thanks to @tunggad, the comment is extremely helpful. Verified 1.13.1.

tunggad commented on 2018-12-26 12:28

To save you time searching the net for solutions why your kubeadm init could not run successfully, it complains about kubelet, that it is not running or not healthy. This AUR package is not intented for setup a cluster by using kubeadm init, it's intented to setup a cluster from scratch, where all control plane components (kube-apiserver, kube-scheduler, kube-controller-manager) and kube-proxy run as systemd service. But in a cluster setup by kubeadm init these components will be deployed as Pods (kube-system Pods). So if you want to use this AUR package to setup a cluster with kubeadm init, do the followings tweaks:

I tried to mimic the unit file and the drop-in file /etc/systemd/system/kubelet.service.d/10-kubeadm.conf, normally available in DEB or RPM package of other distros, but missing in this AUR package, by making following modifications to the systemd unit file and it's referenced EnvironmentFiles. The result looks like that:

--- /usr/lib/systemd/system/kubelet.service ---

[Unit] Description=Kubernetes Kubelet Server Documentation=https://github.com/GoogleCloudPlatform/kubernetes

[Service] WorkingDirectory=/var/lib/kubelet

EnvironmentFile=-/etc/kubernetes/config

EnvironmentFile=-/etc/kubernetes/kubelet

ExecStart=/usr/bin/kubelet \

    $KUBE_LOGTOSTDERR \

    $KUBE_LOG_LEVEL \

    $KUBELET_API_SERVER \

    $KUBELET_ADDRESS \

    $KUBELET_PORT \

    $KUBELET_HOSTNAME \

    $KUBE_ALLOW_PRIV \

    $KUBELET_ARGS

Restart=always

StartLimitInterval=0

RestartSec=10

[Install]

WantedBy=multi-user.target


--- EnvironmentFile: /etc/kubernetes/config ---

logging to stderr means we get it in the systemd journal

KUBE_LOGTOSTDERR="--logtostderr=true"

journal message level, 0 is debug

KUBE_LOG_LEVEL="--v=0"


--- EnvironmentFile: /etc/kubernetes/kubelet ---

KUBELET_ARGS="--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=cgroupfs --network-plugin=cni --pod-infra-container-image=k8s.gcr.io/pause:3.1"


$systemctl status kubelet should look like that:

● kubelet.service - Kubernetes Kubelet Server Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2018-12-23 22:54:48 UTC; 11h ago Docs: https://github.com/GoogleCloudPlatform/kubernetes Main PID: 325 (kubelet) Tasks: 24 (limit: 4915) Memory: 119.3M CGroup: /system.slice/kubelet.service └─325 /usr/bin/kubelet --logtostderr=true --v=0 --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=cgroupfs --network-plugin=cni --pod-infra-container-image=k8s.gcr.io/pause:3.1


Run daemon-reload for the above changes to take effects

$systemctl daemon-reload


Disable all of the following systemd services installed by this AUR package by executing following commands:

$systemctl disable kube-apiserver

$systemctl disable kube-controller-manager

$systemctl disable kube-scheduler

$systemctl disable kube-proxy


======> NOW YOU ARE FINE TO execute #kubeadm init

Without these tweaks your kubeadm init would not be able to start the kubelet.service it needs to setup the cluster for the first time and CNI networking addons (Calico or Flannel) would not work.

Also switch off all swap partitions if you have any, otherwise kubelet would not start! #sudo swapoff -a

simisimis commented on 2018-11-28 12:38

found this tip somewhere on internet that made installing kubernetes possible on my laptop. When building it, command free showed swap usage peaking at 10G+

# modprobe zram

# echo lz4 > /sys/block/zram0/comp_algorithm

# echo 16G > /sys/block/zram0/disksize

# mkswap --label zram0 /dev/zram0

# swapon --priority 100 /dev/zram0

lukeshu commented on 2018-10-30 13:16

Despite go-bindata being in makedepends=(), it still compiles & uses the copy of go-bindata in ./vendor/. I'm not sure what needs to be done to get the build system to use the system go-bindata, but until that is figured out, the makedepend on it can be dropped.

Also, 1.12.2 is out.

flaviut commented on 2018-10-12 23:29

Configuring 8GB of zram to augment my existing 16GB of ram fixed the out of memory issue for me.

bruceleewees commented on 2018-10-04 19:57

@lira downgrading to go-2:1.10.3-1 fixed out of memory issue for me.

lira commented on 2018-09-22 23:20

I'm getting this error:


==> Starting build()...
+++ [0922 20:33:30] Building go targets for linux/amd64:
    ./vendor/k8s.io/code-generator/cmd/deepcopy-gen
+++ [0922 20:33:36] Building go targets for linux/amd64:
    ./vendor/k8s.io/code-generator/cmd/defaulter-gen
+++ [0922 20:33:39] Building go targets for linux/amd64:
    ./vendor/k8s.io/code-generator/cmd/conversion-gen
+++ [0922 20:33:43] Building go targets for linux/amd64:
    ./vendor/k8s.io/code-generator/cmd/openapi-gen
+++ [0922 20:33:47] Building go targets for linux/amd64:
    ./vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [0922 20:33:48] Building go targets for linux/amd64:
    cmd/kube-proxy
    cmd/kube-apiserver
    cmd/kube-controller-manager
    cmd/cloud-controller-manager
    cmd/kubelet
    cmd/kubeadm
    cmd/hyperkube
    cmd/kube-scheduler
    vendor/k8s.io/kube-aggregator
    vendor/k8s.io/apiextensions-apiserver
    cluster/gce/gci/mounter
    cmd/kubectl
    cmd/gendocs
    cmd/genkubedocs
    cmd/genman
    cmd/genyaml
    cmd/genswaggertypedocs
    cmd/linkcheck
    vendor/github.com/onsi/ginkgo/ginkgo
    test/e2e/e2e.test
    cmd/kubemark
    vendor/github.com/onsi/ginkgo/ginkgo
    test/e2e_node/e2e_node.test

k8s.io/kubernetes/cmd/genman

fatal error: runtime: out of memory

runtime stack: runtime.throw(0x64b1d4, 0x16) /usr/lib/go/src/runtime/panic.go:608 +0x72 runtime.sysMap(0xc098000000, 0x4000000, 0x7f9fd8) /usr/lib/go/src/runtime/mem_linux.go:156 +0xc7 runtime.(mheap).sysAlloc(0x7e1560, 0x4000000, 0x0, 0x7ffd51f26dc8) /usr/lib/go/src/runtime/malloc.go:619 +0x1c7 runtime.(mheap).grow(0x7e1560, 0x378, 0x0) /usr/lib/go/src/runtime/mheap.go:920 +0x42 runtime.(mheap).allocSpanLocked(0x7e1560, 0x378, 0x7f9fe8, 0x20302500000000) /usr/lib/go/src/runtime/mheap.go:848 +0x337 runtime.(mheap).alloc_m(0x7e1560, 0x378, 0x410101, 0x7f4d9a085800) /usr/lib/go/src/runtime/mheap.go:692 +0x119 runtime.(mheap).alloc.func1() /usr/lib/go/src/runtime/mheap.go:759 +0x4c runtime.(mheap).alloc(0x7e1560, 0x378, 0x7ffd51000101, 0x415705) /usr/lib/go/src/runtime/mheap.go:758 +0x8a runtime.largeAlloc(0x6f0000, 0x450100, 0x7f4da1fc6440) /usr/lib/go/src/runtime/malloc.go:1019 +0x97 runtime.mallocgc.func1() /usr/lib/go/src/runtime/malloc.go:914 +0x46 runtime.systemstack(0x454999) /usr/lib/go/src/runtime/asm_amd64.s:351 +0x66 runtime.mstart() /usr/lib/go/src/runtime/proc.go:1229

goroutine 1 [running]: runtime.systemstack_switch() /usr/lib/go/src/runtime/asm_amd64.s:311 fp=0xc08a081fb0 sp=0xc08a081fa8 pc=0x454a90 runtime.mallocgc(0x6f0000, 0x0, 0x0, 0xc08a082090) /usr/lib/go/src/runtime/malloc.go:913 +0x896 fp=0xc08a082050 sp=0xc08a081fb0 pc=0x40bb46 runtime.growslice(0x5fc700, 0xc0962b4000, 0x58c000, 0x58c000, 0x58c001, 0x0, 0x7a, 0x89) /usr/lib/go/src/runtime/slice.go:197 +0x219 fp=0xc08a0820b8 sp=0xc08a082050 pc=0x440329 cmd/link/internal/sym.(Symbol).AddUint8(...) /usr/lib/go/src/cmd/link/internal/sym/symbol.go:106 cmd/link/internal/ld.writelines(0xc000530000, 0xc02760f110, 0xc050ed6000, 0x11b0, 0x1400, 0xc09245fe20, 0xc09245fef8, 0xc096877140, 0x3, 0x4, ...) /usr/lib/go/src/cmd/link/internal/ld/dwarf.go:1284 +0x1758 fp=0xc08a0825e8 sp=0xc08a0820b8 pc=0x551868 cmd/link/internal/ld.dwarfgeneratedebugsyms(0xc000530000) /usr/lib/go/src/cmd/link/internal/ld/dwarf.go:1764 +0x97f fp=0xc08a0827d0 sp=0xc08a0825e8 pc=0x556aff cmd/link/internal/ld.(Link).dodata(0xc000530000) /usr/lib/go/src/cmd/link/internal/ld/data.go:1585 +0x3344 fp=0xc08a082ce8 sp=0xc08a0827d0 pc=0x53c5c4 cmd/link/internal/ld.Main(0x7cec20, 0x10, 0x20, 0x1, 0x7, 0x10, 0x64cd8e, 0x1b, 0x649ed2, 0x14, ...) /usr/lib/go/src/cmd/link/internal/ld/main.go:232 +0xb44 fp=0xc08a082e80 sp=0xc08a082ce8 pc=0x582264 main.main() /usr/lib/go/src/cmd/link/main.go:65 +0x227 fp=0xc08a083f98 sp=0xc08a082e80 pc=0x5da0f7 runtime.main() /usr/lib/go/src/runtime/proc.go:201 +0x207 fp=0xc08a083fe0 sp=0xc08a083f98 pc=0x42ba67 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc08a083fe8 sp=0xc08a083fe0 pc=0x4569f1 !!! [0922 20:35:35] Call tree: !!! [0922 20:35:35] 1: /tmp/yaourt-tmp-lira/aur-kubernetes/src/kubernetes-1.11.3/hack/lib/golang.sh:610 kube::golang::build_binaries_for_platform(...) !!! [0922 20:35:35] 2: hack/make-rules/build.sh:27 kube::golang::build_binaries(...) !!! [0922 20:35:35] Call tree: !!! [0922 20:35:35] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...) !!! [0922 20:35:35] Call tree: !!! [0922 20:35:35] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...) make: *** [Makefile:92: all] Error 1 ==> ERROR: A failure occurred in build(). Aborting... ==> ERROR: Makepkg was unable to build kubernetes.

maximih commented on 2018-09-12 11:26

After manually fixing the issue mentioned before, I hit another issue:

Sep 12 12:20:56 kh1 kubelet[7523]: F0912 12:20:56.631813    7523 server.go:262] failed to run Kubelet: failed to create kubelet: misconfiguration: kubelet cgroup driver: "systemd" is different from docker cgroup driver: "cgroupfs"

This is also caused by incorrect settings in /etc/kubernetes/kubelet:

KUBELET_ARGS="--cgroup-driver=systemd --fail-swap-on=false"

The cgrouo should be set to cgroupfs to match the docker one.

maximih commented on 2018-09-12 11:03

There seems to be a bug in the systemd start file. I get :

Sep 12 11:59:31 kh1 kubelet[6618]: F0912 11:59:31.022717    6618 server.go:155] unknown command: /etc/kubernetes/kubelet.kubeconfig
Sep 12 11:59:31 kh1 systemd[1]: kubelet.service: Service RestartSec=100ms expired, scheduling restart.
Sep 12 11:59:31 kh1 systemd[1]: kubelet.service: Scheduled restart job, restart counter is at 5.
Sep 12 11:59:31 kh1 systemd[1]: Stopped Kubernetes Kubelet Server.
Sep 12 11:59:31 kh1 systemd[1]: kubelet.service: Start request repeated too quickly.
Sep 12 11:59:31 kh1 systemd[1]: kubelet.service: Failed with result 'exit-code'.
Sep 12 11:59:31 kh1 systemd[1]: Failed to start Kubernetes Kubelet Server.

The issue is in /etc/kubernetes/kubelet which provides the kubeconfig without the --kubeconfig flag name:

# Edit the kubelet.kubeconfig to have correct cluster server address
KUBELET_KUBECONFIG=/etc/kubernetes/kubelet.kubeconfig