xiaods / k8e

K8E - Kubernetes Easy Engine
https://getk8e.com
Apache License 2.0
391 stars 25 forks source link

安装完Cilium status 错误 dial tcp 127.0.0.1:8080: connect: connection refused #293

Closed defp closed 1 year ago

defp commented 1 year ago

os

root@k8e-server:~# cat /etc/issue
Ubuntu 20.04.5 LTS \n \l

安装脚本

root@k8e-server:~# curl -sfL https://getk8e.com/install.sh | API_SERVER_IP=10.3.56.131 K8E_TOKEN=ilovek8e INSTALL_K8E_EXEC="server --cluster-init --write-kubeconfig-mode=666" sh -

logs

root@k8e-server:~# curl -sfL https://getk8e.com/install.sh | API_SERVER_IP=10.3.56.131 K8E_TOKEN=ilovek8e INSTALL_K8E_EXEC="server --cluster-init --write-kubeconfig-mode=666" sh -
Finding latest version from GitHub
v1.25.5-rc4+k8e1
Downloading package https://github.com/xiaods/k8e/releases/download/v1.25.5-rc4+k8e1/k8e as /tmp/k8e
Download complete.
[INFO]  Creating /usr/local/bin/kubectl symlink to k8e
[INFO]  Creating /usr/local/bin/crictl symlink to k8e
[INFO]  Skipping /usr/local/bin/ctr symlink to k8e, command exists in PATH at /usr/bin/ctr
[INFO]  Create nerdctl symlink for k8e
[INFO]  Create cilium ctl symlink for k8e
[INFO]  Create osm edge symlink for k8e
[INFO]  Creating killall script /usr/local/bin/k8e-killall.sh
[INFO]  Creating uninstall script /usr/local/bin/k8e-uninstall.sh
[INFO]  env: Creating environment file /etc/systemd/system/k8e.service.env
[INFO]  systemd: Creating service file /etc/systemd/system/k8e.service
[INFO]  systemd: Enabling k8e unit
Created symlink /etc/systemd/system/multi-user.target.wants/k8e.service → /etc/systemd/system/k8e.service.
[INFO]  systemd: Starting k8e
[INFO]  init OS config && Checking k8e config
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-arptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_local_reserved_ports = 30000-32767
vm.max_map_count = 262144
vm.swappiness = 1
fs.inotify.max_user_instances = 524288
kernel.pid_max = 65535

Verifying binaries in /var/lib/k8e/data/432609fb57b23d027569782d907399392e10b2ed11d3ff8956fb3eef2cb2eeb7/bin:
- sha256sum: good
- links: good

System:
- /usr/sbin iptables v1.8.4 (legacy): ok
- swap: disabled
- routes: ok

Limits:
- /proc/sys/kernel/keys/root_maxkeys: 1000000

modprobe: FATAL: Module configs not found in directory /lib/modules/5.4.0-135-generic
info: reading kernel config from /boot/config-5.4.0-135-generic ...

Generally Necessary:
- cgroup hierarchy: cgroups Hybrid mounted, cpuset|memory controllers status: good
- /usr/sbin/apparmor_parser
apparmor: enabled and tools installed
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: enabled
- CONFIG_MEMCG: enabled
- CONFIG_KEYS: enabled
- CONFIG_VETH: enabled (as module)
- CONFIG_BRIDGE: enabled (as module)
- CONFIG_BRIDGE_NETFILTER: enabled (as module)
- CONFIG_IP_NF_FILTER: enabled (as module)
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_IPVS: enabled (as module)
- CONFIG_IP_NF_NAT: enabled (as module)
- CONFIG_NF_NAT: enabled (as module)
- CONFIG_POSIX_MQUEUE: enabled

Optional Features:
- CONFIG_USER_NS: enabled
- CONFIG_SECCOMP: enabled
- CONFIG_CGROUP_PIDS: enabled
- CONFIG_BLK_CGROUP: enabled
- CONFIG_BLK_DEV_THROTTLING: enabled
- CONFIG_CGROUP_PERF: enabled
- CONFIG_CGROUP_HUGETLB: enabled
- CONFIG_NET_CLS_CGROUP: enabled (as module)
- CONFIG_CGROUP_NET_PRIO: enabled
- CONFIG_CFS_BANDWIDTH: enabled
- CONFIG_FAIR_GROUP_SCHED: enabled
- CONFIG_RT_GROUP_SCHED: missing
- CONFIG_IP_NF_TARGET_REDIRECT: enabled (as module)
- CONFIG_IP_SET: enabled (as module)
- CONFIG_IP_VS: enabled (as module)
- CONFIG_IP_VS_NFCT: enabled
- CONFIG_IP_VS_PROTO_TCP: enabled
- CONFIG_IP_VS_PROTO_UDP: enabled
- CONFIG_IP_VS_RR: enabled (as module)
- CONFIG_EXT4_FS: enabled
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- Network Drivers:
  - "overlay":
    - CONFIG_VXLAN: enabled (as module)
      Optional (for encrypted networks):
      - CONFIG_CRYPTO: enabled
      - CONFIG_CRYPTO_AEAD: enabled
      - CONFIG_CRYPTO_GCM: enabled
      - CONFIG_CRYPTO_SEQIV: enabled
      - CONFIG_CRYPTO_GHASH: enabled
      - CONFIG_XFRM: enabled
      - CONFIG_XFRM_USER: enabled (as module)
      - CONFIG_XFRM_ALGO: enabled (as module)
      - CONFIG_INET_ESP: enabled (as module)
      - CONFIG_INET_XFRM_MODE_TRANSPORT: missing
- Storage Drivers:
  - "overlay":
    - CONFIG_OVERLAY_FS: enabled (as module)

STATUS: pass
[INFO]  Installing cilium network cni/operator
ℹ️  Using Cilium version 1.12.3
🔮 Auto-detected cluster name: default
🔮 Auto-detected datapath mode: tunnel
🔮 Auto-detected kube-proxy has not been installed
ℹ️ Cilium will fully replace all functionalities of kube-proxy
ℹ️  helm template --namespace kube-system cilium cilium/cilium --version 1.12.3 --set cluster.id=0,cluster.name=default,encryption.nodeEncryption=false,ipam.operator.clusterPoolIPv4PodCIDR=10.42.0.0/16,k8sServiceHost=10.3.56.131,k8sServicePort=6443,kubeProxyReplacement=strict,operator.replicas=1,serviceAccounts.cilium.name=cilium,serviceAccounts.operator.name=cilium-operator,tunnel=vxlan
ℹ️  Storing helm values file in kube-system/cilium-cli-helm-values Secret
🔑 Created CA in secret cilium-ca
🔑 Generating certificates for Hubble...
🚀 Creating Service accounts...
🚀 Creating Cluster roles...
🚀 Creating ConfigMap for Cilium version 1.12.3...
🚀 Creating Agent DaemonSet...
🚀 Creating Operator Deployment...
⌛ Waiting for Cilium to be installed and ready...
✅ Cilium was successfully installed! Run 'cilium status' to view installation health
[INFO]  Done! Happy deployment.

cilium status

root@k8e-server:~# KUBECONFIG=/etc/k8e/k8e.yaml && cilium status
    /¯¯\
 /¯¯\__/¯¯\    Cilium:         1 errors
 \__/¯¯\__/    Operator:       1 errors
 /¯¯\__/¯¯\    Hubble:         1 warnings
 \__/¯¯\__/    ClusterMesh:    1 warnings
    \__/

Cluster Pods:    0/0 managed by Cilium
Errors:          cilium                   cilium                   Get "http://localhost:8080/apis/apps/v1/namespaces/kube-system/daemonsets/cilium": dial tcp 127.0.0.1:8080: connect: connection refused
                 cilium-operator          cilium-operator          Get "http://localhost:8080/apis/apps/v1/namespaces/kube-system/deployments/cilium-operator": dial tcp 127.0.0.1:8080: connect: connection refused
Warnings:        hubble-ui                hubble-ui                hubble ui is not deployed
                 hubble-relay             hubble-relay             hubble relay is not deployed
                 clustermesh-apiserver    clustermesh-apiserver    clustermesh is not deployed

k8e version

root@k8e-server:~# k8e -v

/$$        /$$$$$$
| $$       /$$__  $$
| $$   /$$| $$  \ $$  /$$$$$$
| $$  /$$/|  $$$$$$/ /$$__  $$
| $$$$$$/  >$$__  $$| $$$$$$$$
| $$_  $$ | $$  \ $$| $$_____/
| $$ \  $$|  $$$$$$/|  $$$$$$$
|__/  \__/ \______/  \_______/

Get Kubernetes cluster the easy way.
k8e version v1.25.5-rc4+k8e1 (91e44e58)
go version go1.19.4
defp commented 1 year ago

kube-system pods

root@k8e-server:~# kubectl get pods -n kube-system
NAME                                      READY   STATUS    RESTARTS   AGE
cilium-operator-5cf56d7bd5-299xx          1/1     Running   0          14m
cilium-v9msv                              1/1     Running   0          14m
coredns-597584b69b-twcpz                  1/1     Running   0          16m
local-path-provisioner-79f67d76f8-gwv2g   1/1     Running   0          16m
metrics-server-5f9f776df5-xg9nf
defp commented 1 year ago

重启系统ok了

image