我是新手,正在学习kubernetes,当我尝试构建kubernetes集群时,我遇到了一些问题。 这是我的问题,我不知道如何解决
当我输入命令时:
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
我遇到了这些问题:
我尝试指定--apiserver-advertise-address = $(主机名-i),但遇到另一个问题:
$sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address 10.181.144.168
I0316 21:11:04.632624 37136 version.go:93] could not fetch a Kubernetes version from the internet: unable to get URL "https://dl.k8s.io/release/stable-1.txt": Get https://dl.k8s.io/release/stable-1.txt: dial tcp 23.236.58.218:443: connect: network is unreachable
I0316 21:11:04.632720 37136 version.go:94] falling back to the local client version: v1.12.2
[init] using Kubernetes version: v1.12.2
[preflight] running pre-flight checks
[preflight/images] Pulling images required for setting up a Kubernetes cluster
[preflight/images] This might take a minute or two, depending on the speed of your internet connection
[preflight/images] You can also perform this action in beforehand using 'kubeadm config images pull'
[kubelet] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[preflight] Activating the kubelet service
[certificates] Generated etcd/ca certificate and key.
[certificates] Generated etcd/peer certificate and key.
[certificates] etcd/peer serving cert is signed for DNS names [vsearchtradeg1host010181144168.et2 localhost] and IPs [10.181.144.168 127.0.0.1 ::1]
[certificates] Generated apiserver-etcd-client certificate and key.
[certificates] Generated etcd/server certificate and key.
[certificates] etcd/server serving cert is signed for DNS names [vsearchtradeg1host010181144168.et2 localhost] and IPs [127.0.0.1 ::1]
[certificates] Generated etcd/healthcheck-client certificate and key.
[certificates] Generated front-proxy-ca certificate and key.
[certificates] Generated front-proxy-client certificate and key.
[certificates] Generated ca certificate and key.
[certificates] Generated apiserver certificate and key.
[certificates] apiserver serving cert is signed for DNS names [vsearchtradeg1host010181144168.et2 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 10.181.144.168]
[certificates] Generated apiserver-kubelet-client certificate and key.
[certificates] valid certificates and keys now exist in "/etc/kubernetes/pki"
[certificates] Generated sa key and public key.
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/scheduler.conf"
[controlplane] wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests"
[init] this might take a minute or longer if the control plane images have to be pulled
d[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248: connect: connection refused.
d[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248: connect: connection refused.
d[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248: connect: connection refused.
dd[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248: connect: connection refused.
Unfortunately, an error has occurred:
timed out waiting for the condition
This error is likely caused by:
- The kubelet is not running
- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)
If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
- 'systemctl status kubelet'
- 'journalctl -xeu kubelet'
Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI, e.g. docker.
Here is one example how you may list all Kubernetes containers running in docker:
- 'docker ps -a | grep kube | grep -v pause'
Once you have found the failing container, you can inspect its logs with:
- 'docker logs CONTAINERID'
couldn't initialize a Kubernetes cluster
大多数答案告诉我我需要访问互联网。但是我已经下载了核心图片
$sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
k8s.gcr.io/kube-proxy v1.12.2 15e9da1ca195 4 months ago 96.5MB
k8s.gcr.io/kube-apiserver v1.12.2 51a9c329b7c5 4 months ago 194MB
k8s.gcr.io/kube-controller-manager v1.12.2 15548c720a70 4 months ago 164MB
k8s.gcr.io/kube-scheduler v1.12.2 d6d57c76136c 4 months ago 58.3MB
k8s.gcr.io/etcd 3.2.24 3cab8e1b9802 5 months ago 220MB
k8s.gcr.io/coredns 1.2.2 367cdc8433a4 6 months ago 39.2MB
k8s.gcr.io/pause 3.1 da86e6ba6ca1 15 months ago 742kB
我从/ var / log / message中找到了日志:
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 systemd[1]: kubelet.service holdoff time over, scheduling restart.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 systemd[1]: Started kubelet: The Kubernetes Node Agent.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 systemd[1]: Starting kubelet: The Kubernetes Node Agent...
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: Flag --cgroup-driver has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: Flag --cgroup-driver has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 systemd[1]: Started Kubernetes systemd probe.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 systemd[1]: Starting Kubernetes systemd probe.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.617395 81273 server.go:408] Version: v1.12.2
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.617559 81273 plugins.go:99] No cloud provider specified.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.620585 81273 certificate_store.go:131] Loading cert/key pair from "/var/lib/kubelet/pki/kubelet-client-current.pem".
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.654038 81273 server.go:667] --cgroups-per-qos enabled, but --cgroup-root was not specified. defaulting to /
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.654274 81273 container_manager_linux.go:247] container manager verified user specified cgroup-root exists: []
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.654289 81273 container_manager_linux.go:252] Creating Container Manager object based on Node Config: {RuntimeCgroupsName: SystemCgroupsName: KubeletCgroupsName: ContainerRuntime:docker CgroupsPerQOS:true CgroupRoot:/ CgroupDriver:cgroupfs KubeletRootDir:/var/lib/kubelet ProtectKernelDefaults:false NodeAllocatableConfig:{KubeReservedCgroupName: SystemReservedCgroupName: EnforceNodeAllocatable:map[pods:{}] KubeReserved:map[] SystemReserved:map[] HardEvictionThresholds:[{Signal:imagefs.available Operator:LessThan Value:{Quantity:<nil> Percentage:0.15} GracePeriod:0s MinReclaim:<nil>} {Signal:memory.available Operator:LessThan Value:{Quantity:100Mi Percentage:0} GracePeriod:0s MinReclaim:<nil>} {Signal:nodefs.available Operator:LessThan Value:{Quantity:<nil> Percentage:0.1} GracePeriod:0s MinReclaim:<nil>} {Signal:nodefs.inodesFree Operator:LessThan Value:{Quantity:<nil> Percentage:0.05} GracePeriod:0s MinReclaim:<nil>}]} QOSReserved:map[] ExperimentalCPUManagerPolicy:none ExperimentalCPUManagerReconcilePeriod:10s ExperimentalPodPidsLimit:-1 EnforceCPULimits:true CPUCFSQuotaPeriod:100ms}
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.654396 81273 container_manager_linux.go:271] Creating device plugin manager: true
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.654432 81273 state_mem.go:36] [cpumanager] initializing new in-memory state store
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.654579 81273 state_mem.go:84] [cpumanager] updated default cpuset: ""
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.654599 81273 state_mem.go:92] [cpumanager] updated cpuset assignments: "map[]"
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.654695 81273 kubelet.go:279] Adding pod path: /etc/kubernetes/manifests
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.654745 81273 kubelet.go:304] Watching apiserver
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: E0318 10:48:39.655393 81273 reflector.go:134] k8s.io/kubernetes/pkg/kubelet/kubelet.go:442: Failed to list *v1.Service: Get https://10.181.144.168:6443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.181.144.168:6443: connect: connection refused
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: E0318 10:48:39.655393 81273 reflector.go:134] k8s.io/kubernetes/pkg/kubelet/kubelet.go:451: Failed to list *v1.Node: Get https://10.181.144.168:6443/api/v1/nodes?fieldSelector=metadata.name%3Dvsearchtradeg1host010181144168.et2&limit=500&resourceVersion=0: dial tcp 10.181.144.168:6443: connect: connection refused
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: E0318 10:48:39.655490 81273 reflector.go:134] k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:47: Failed to list *v1.Pod: Get https://10.181.144.168:6443/api/v1/pods?fieldSelector=spec.nodeName%3Dvsearchtradeg1host010181144168.et2&limit=500&resourceVersion=0: dial tcp 10.181.144.168:6443: connect: connection refused
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.656470 81273 client.go:75] Connecting to docker on unix:///var/run/docker.sock
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.656489 81273 client.go:104] Start docker client with request timeout=2m0s
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.657494 81273 docker_service.go:540] Hairpin mode set to "promiscuous-bridge" but kubenet is not enabled, falling back to "hairpin-veth"
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.657515 81273 docker_service.go:236] Hairpin mode set to "hairpin-veth"
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.657592 81273 cni.go:188] Unable to update cni config: No networks found in /etc/cni/net.d
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.659005 81273 hostport_manager.go:68] The binary conntrack is not installed, this can cause failures in network connection cleanup.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.659058 81273 cni.go:188] Unable to update cni config: No networks found in /etc/cni/net.d
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.659091 81273 docker_service.go:251] Docker cri networking managed by cni
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.671559 81273 docker_service.go:256] Docker Info: &{ID:FGTF:A4SR:ARMW:4TII:2HCM:CT3G:NYZA:XRMB:CSHA:E5X6:TWCE:5JIP Containers:0 ContainersRunning:0 ContainersPaused:0 ContainersStopped:0 Images:8 Driver:overlay DriverStatus:[[Backing Filesystem extfs] [Supports d_type true]] SystemStatus:[] Plugins:{Volume:[local] Network:[bridge host macvlan null overlay] Authorization:[] Log:[awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog]} MemoryLimit:true SwapLimit:true KernelMemory:true CPUCfsPeriod:true CPUCfsQuota:true CPUShares:true CPUSet:true IPv4Forwarding:true BridgeNfIptables:true BridgeNfIP6tables:true Debug:false NFd:18 OomKillDisable:true NGoroutines:26 SystemTime:2019-03-18T10:48:39.661768258+08:00 LoggingDriver:json-file CgroupDriver:cgroupfs NEventsListener:0 KernelVersion:3.10.0-327.ali2018.alios7.x86_64 OperatingSystem:Alibaba Group Enterprise Linux Server 7.2 (Paladin) OSType:linux Architecture:x86_64 IndexServerAddress:https://index.docker.io/v1/ RegistryConfig:0xc420925f10 NCPU:32 MemTotal:134992273408 GenericResources:[] DockerRootDir:/var/lib/docker HTTPProxy: HTTPSProxy: NoProxy: Name:vsearchtradeg1host010181144168.et2 Labels:[] ExperimentalBuild:false ServerVersion:17.06.2-ce ClusterStore: ClusterAdvertise: Runtimes:map[runc:{Path:docker-runc Args:[]}] DefaultRuntime:runc Swarm:{NodeID: NodeAddr: LocalNodeState:inactive ControlAvailable:false Error: RemoteManagers:[] Nodes:0 Managers:0 Cluster:<nil>} LiveRestoreEnabled:false Isolation: InitBinary:docker-init ContainerdCommit:{ID:6e23458c129b551d5c9871e5174f6b1b7f6d1170 Expected:6e23458c129b551d5c9871e5174f6b1b7f6d1170} RuncCommit:{ID:b0917904e049873e6fe70520b9a049b8cb3a9ea2 Expected:b0917904e049873e6fe70520b9a049b8cb3a9ea2} InitCommit:{ID:949e6fa Expected:949e6fa} SecurityOptions:[name=seccomp,profile=default]}
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.671630 81273 docker_service.go:269] Setting cgroupDriver to cgroupfs
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.685561 81273 kuberuntime_manager.go:197] Container runtime docker initialized, version: 17.06.2-ce, apiVersion: 1.30.0
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.688250 81273 server.go:1013] Started kubelet
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: E0318 10:48:39.688286 81273 kubelet.go:1287] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.688306 81273 server.go:133] Starting to listen on 0.0.0.0:10250
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: E0318 10:48:39.688620 81273 event.go:212] Unable to write event: 'Post https://10.181.144.168:6443/api/v1/namespaces/default/events: dial tcp 10.181.144.168:6443: connect: connection refused' (may retry after sleeping)
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.688664 81273 fs_resource_analyzer.go:66] Starting FS ResourceAnalyzer
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.688694 81273 status_manager.go:152] Starting to sync pod status with apiserver
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.688707 81273 kubelet.go:1804] Starting kubelet main sync loop.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.688726 81273 kubelet.go:1821] skipping pod synchronization - [container runtime is down PLEG is not healthy: pleg was last seen active 2562047h47m16.854775807s ago; threshold is 3m0s]
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.688746 81273 volume_manager.go:248] Starting Kubelet Volume Manager
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.688770 81273 desired_state_of_world_populator.go:130] Desired state populator starts to run
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.689076 81273 server.go:318] Adding debug handlers to kubelet server.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.689461 81273 cni.go:188] Unable to update cni config: No networks found in /etc/cni/net.d
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: E0318 10:48:39.689645 81273 kubelet.go:2167] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.709949 81273 container.go:507] Failed to update stats for container "/": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.750913 81273 container.go:507] Failed to update stats for container "/agent": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/agent/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.764355 81273 container.go:507] Failed to update stats for container "/system.slice/crond.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/crond.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.764979 81273 container.go:507] Failed to update stats for container "/system.slice/staragentctl.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/staragentctl.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.765499 81273 container.go:507] Failed to update stats for container "/system.slice/systemd-journal-catalog-update.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/systemd-journal-catalog-update.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.766343 81273 container.go:507] Failed to update stats for container "/system.slice/systemd-remount-fs.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/systemd-remount-fs.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.766793 81273 container.go:507] Failed to update stats for container "/system.slice/docker.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/docker.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.766966 81273 container.go:507] Failed to update stats for container "/system.slice/z_nic_irq_set.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/z_nic_irq_set.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.767171 81273 container.go:507] Failed to update stats for container "/system.slice/syslog-ng.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/syslog-ng.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.767481 81273 container.go:507] Failed to update stats for container "/system.slice/systemd-fsck-root.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/systemd-fsck-root.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.768221 81273 container.go:507] Failed to update stats for container "/system.slice/systemd-update-utmp.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/systemd-update-utmp.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.768707 81273 container.go:507] Failed to update stats for container "/agent/logagent": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/agent/logagent/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.769014 81273 container.go:507] Failed to update stats for container "/system.slice/ntpdate.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/ntpdate.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.769153 81273 container.go:507] Failed to update stats for container "/system.slice/mcelog.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/mcelog.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: W0318 10:48:39.769860 81273 container.go:507] Failed to update stats for container "/system.slice/rhel-domainname.service": failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/system.slice/rhel-domainname.service/cpuacct.stat is expected to have 4 fields, continuing to push stats
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.788819 81273 kubelet.go:1821] skipping pod synchronization - [container runtime is down]
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: E0318 10:48:39.788824 81273 kubelet.go:2236] node "vsearchtradeg1host010181144168.et2" not found
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.788842 81273 kubelet_node_status.go:276] Setting node annotation to enable volume controller attach/detach
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.791263 81273 kubelet_node_status.go:70] Attempting to register node vsearchtradeg1host010181144168.et2
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: E0318 10:48:39.791612 81273 kubelet_node_status.go:92] Unable to register node "vsearchtradeg1host010181144168.et2" with API server: Post https://10.181.144.168:6443/api/v1/nodes: dial tcp 10.181.144.168:6443: connect: connection refused
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.847902 81273 kubelet_node_status.go:276] Setting node annotation to enable volume controller attach/detach
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.849675 81273 cpu_manager.go:155] [cpumanager] starting with none policy
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.849686 81273 cpu_manager.go:156] [cpumanager] reconciling every 10s
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: I0318 10:48:39.849695 81273 policy_none.go:42] [cpumanager] none policy: Start
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 kubelet[81273]: F0318 10:48:39.849713 81273 kubelet.go:1359] Failed to start ContainerManager failed to get rootfs info: unable to find data in memory cache
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 systemd[1]: kubelet.service: main process exited, code=exited, status=255/n/a
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 systemd[1]: Unit kubelet.service entered failed state.
Mar 18 10:48:39 vsearchtradeg1host010181144168.et2 systemd[1]: kubelet.service failed.
我期待有人可以帮助我回答!
答案 0 :(得分:0)
您应该在初始化命令中传递--apiserver-advertise-address = $(主机名-i)
答案 1 :(得分:0)
尝试启动您发布的命令。您使用指定的--apiserver-advertise-address启动了命令。但是我认为,正如评论中指出的那样,您无权访问互联网,或者位于阻止互联网访问的代理服务器或防火墙后面。
答案 2 :(得分:0)
在此之前,您是否有任何集群在运行?如果是这样,则必须清理旧的配置并重新引导群集。
kubeadm reset -f
sudo rm -rf /etc/kubernetes/
kubeadm config images pull
sysctl net.bridge.bridge-nf-call-iptables=1
kubeadm init --pod-network-cidr=10.244.0.0/16
答案 3 :(得分:0)
您需要在初始化过程中传递kubernetes版本,以消除有关无法连接到互联网的错误:
sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --kubernetes-version=1.12.2 --apiserver-advertise-address=$(hostname -i)
这应该有效。如果hostname -i
不起作用,则需要通过ifconfig
或ip list
命令使用计算机的IP地址。
答案 4 :(得分:0)
尝试使用此标志--image-repository并运行init