现在我正在尝试通过服务器centos 7安装Kubernetes
首先,我在StackOvrflow和Github上搜索了很多次,很多帖子
但是我没有找到解决方案,请帮助我
我遵循了本教程https://severalnines.com/blog/installing-kubernetes-cluster-minions-centos7-manage-pods-services
cat / etc / kubernetes / apiserver
KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0"
KUBE_API_PORT="--port=9090"
KUBELET_PORT="--kubelet_port=10250"
KUBE_ETCD_SERVERS="--etcd_servers=http://127.0.0.1:2379"
KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"
KUBE_ADMISSION_CONTROL="--admission-
control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,
ServiceAccount,ResourceQuota"
KUBE_API_ARGS=""
当尝试重新启动kube-apiserver时会失败
此输出:
[root@wmsdev01 ahmeditman]# systemctl restart kube-apiserver.service
Job for kube-apiserver.service failed because the control process
exited with error code. See "systemctl status kube-apiserver.service"
and "journalctl -xe" for details.
[root@wmsdev01 ahmeditman]# journalctl -xe
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --secure-port int
The port on which to serve HTTPS with authenticat
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --service-account-api-
audiences strings Identifiers of the API. The
service account token
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --service-account-
issuer string Identifier of the service
account token issuer. T
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --service-account-key-
file stringArray File containing PEM-encoded x509
RSA or ECDSA pri
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --service-account-
lookup If true, validate
ServiceAccount tokens exist in
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --service-account-
signing-key-file string Path to the file that
contains the current privat
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --service-cluster-ip-
range ipNet A CIDR notation IP range from
which to assign ser
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --service-node-port-
range portRange A port range to reserve for
services with NodePor
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --stderrthreshold
severity logs at or above this
threshold go to stderr (def
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --storage-backend
string The storage backend for
persistence. Options: 'et
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --storage-media-type
string The media type to use to store
objects in storage
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --storage-versions
string The per-group version to store
resources in. Spec
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --target-ram-mb int
Memory limit for apiserver in MB (used to configu
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --tls-cert-file string
File containing the default x509 Certificate for
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --tls-cipher-suites
strings Comma-separated list of cipher suites for the ser
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --tls-min-version
string Minimum TLS version supported. Value must match v
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --tls-private-key-file
string File containing the default x509 private key matc
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --tls-sni-cert-key
namedCertKey A pair of x509 certificate and private key file p
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --token-auth-file
string If set, the file that will be used to secure the
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: -v, --v Level
log level for V logs
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --version
version[=true] Print version information and quit
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --vmodule moduleSpec
comma-separated list of pattern=N settings for fi
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --watch-cache
Enable watch caching in the apiserver (default tr
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: --watch-cache-sizes
strings List of watch cache sizes for
every resource (pod
Aug 15 15:59:54 wmsdev01 kube-apiserver[8245]: error: unknown flag: -
-etcd_servers
Aug 15 15:59:54 wmsdev01 systemd[1]: kube-apiserver.service holdoff
time over, scheduling restart.
Aug 15 15:59:54 wmsdev01 systemd[1]: start request repeated too
quickly for kube-apiserver.service
Aug 15 15:59:54 wmsdev01 systemd[1]: Failed to start Kubernetes API
Server.
-- Subject: Unit kube-apiserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-
devel
--
-- Unit kube-apiserver.service has failed.
--
-- The result is failed.
Aug 15 15:59:54 wmsdev01 systemd[1]: Unit kube-apiserver.service
entered failed state.
Aug 15 15:59:54 wmsdev01 systemd[1]: kube-apiserver.service failed.
Aug 15 15:59:54 wmsdev01 login[8164]: pam_securetty(remote:auth):
access denied: tty 'pts/2' is not secure !
Aug 15 15:59:55 wmsdev01 login[8164]: pam_unix(remote:auth): check
pass; user unknown
Aug 15 15:59:58 wmsdev01 login[8164]: FAILED LOGIN SESSION FROM
::ffff:115.124.75.178 FOR (unknown), User not known to the underlying
authentication modul
Aug 15 15:59:58 wmsdev01 login[8164]: PAM 1 more authentication
failure; logname= uid=0 euid=0 tty=pts/2 ruser=
rhost=::ffff:115.124.75.178
lines 1028-106
和systemctl状态kube-apiserver
● kube-apiserver.service - Kubernetes API Server
Loaded: loaded (/usr/lib/systemd/system/kube-apiserver.service;
disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Wed 2018-08-15 15:59:54
CEST; 15min ago
Docs: https://github.com/GoogleCloudPlatform/kubernetes
Process: 8245 ExecStart=/usr/bin/kube-apiserver $KUBE_LOGTOSTDERR
$KUBE_LOG_LEVEL $KUBE_ETCD_SERVERS $KUBE_API_ADDRESS $KUBE_API_PORT
$KUBELET_PORT $KUBE_ALLOW_PRIV $KUBE_SERVICE_ADDRESSES
$KUBE_ADMISSION_CONTROL $KUBE_API_ARGS (code=exited, status=1/FAILURE)
Main PID: 8245 (code=exited, status=1/FAILURE)
Aug 15 15:59:54 wmsdev01 systemd[1]: kube-apiserver.service: main
process exited, code=exited, status=1/FAILURE
Aug 15 15:59:54 wmsdev01 systemd[1]: Failed to start Kubernetes API
Server.
Aug 15 15:59:54 wmsdev01 systemd[1]: Unit kube-apiserver.service
entered failed state.
Aug 15 15:59:54 wmsdev01 systemd[1]: kube-apiserver.service failed.
Aug 15 15:59:54 wmsdev01 systemd[1]: kube-apiserver.service holdoff
time over, scheduling restart.
Aug 15 15:59:54 wmsdev01 systemd[1]: start request repeated too
quickly
for kube-apiserver.service
Aug 15 15:59:54 wmsdev01 systemd[1]: Failed to start Kubernetes API
Server.
Aug 15 15:59:54 wmsdev01 systemd[1]: Unit kube-apiserver.service
entered
failed state.
Aug 15 15:59:54 wmsdev01 systemd[1]: kube-apiserver.service failed.