继续执行命令
kubectl logs ks-apiserver-5b548d7c5c-rh5wk -n kubesphere-system
查看pod运行日志失败,显示:
W0417 12:09:21.976984 1 client_config.go:549] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0417 12:09:21.978374 1 server.go:179] Start cache objects
Error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request
Usage:
ks-apiserver [flags]
Flags:
--add-dir-header If true, adds the file directory to the header
--alsologtostderr log to standard error as well as files
--bind-address string server bind address (default "0.0.0.0")
--elasticsearch-host string ElasticSearch logging service host. KubeSphere is using elastic as log store, if this filed left blank, KubeSphere will use kubernetes builtin log API instead, and the following elastic search options will be ignored.
--elasticsearch-version string ElasticSearch major version, e.g. 5/6/7, if left blank, will detect automatically.Currently, minimum supported version is 5.x
-h, --help help for ks-apiserver
--index-prefix string Index name prefix. KubeSphere will retrieve logs against indices matching the prefix. (default "fluentbit")
--insecure-port int insecure port number (default 9090)
--istio-pilot-host string istio pilot discovery service url
--jaeger-query-host string jaeger query service url
--jenkins-host string Jenkins service host address. If left blank, means Jenkins is unnecessary.
--jenkins-max-connections int Maximum allowed connections to Jenkins. (default 100)
--jenkins-password string Password for access to Jenkins service, used pair with username.
--jenkins-username string Username for access to Jenkins service. Leave it blank if there isn't any.
--kubeconfig string Path for kubernetes kubeconfig file, if left blank, will use in cluster way.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory
--log-file string If non-empty, use this log file
--log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--logtostderr log to standard error instead of files (default true)
--master string Used to generate kubeconfig for downloading, if not specified, will use host in kubeconfig.
--mysql-host string MySQL service host address. If left blank, the following related mysql options will be ignored.
--mysql-max-connection-life-time duration Maximum connection life time allowed to connecto to mysql. (default 10s)
--mysql-max-idle-connections int Maximum idle connections allowed to connect to mysql. (default 100)
--mysql-max-open-connections int Maximum open connections allowed to connect to mysql. (default 100)
--mysql-password string Password for access to mysql, should be used pair with password.
--mysql-username string Username for access to mysql service.
--openpitrix-app-manager-endpoint string OpenPitrix app manager endpoint
--openpitrix-attachment-manager-endpoint string OpenPitrix attachment manager endpoint
--openpitrix-category-manager-endpoint string OpenPitrix category manager endpoint
--openpitrix-cluster-manager-endpoint string OpenPitrix cluster manager endpoint
--openpitrix-repo-indexer-endpoint string OpenPitrix repo indexer endpoint
--openpitrix-repo-manager-endpoint string OpenPitrix repo manager endpoint
--openpitrix-runtime-manager-endpoint string OpenPitrix runtime manager endpoint
--prometheus-endpoint string Prometheus service endpoint which stores KubeSphere monitoring data, if left blank, will use builtin metrics-server as data source.
--prometheus-secondary-endpoint string Prometheus secondary service endpoint, if left empty and endpoint is set, will use endpoint instead.
--s3-access-key-id string access key of s2i s3 (default "AKIAIOSFODNN7EXAMPLE")
--s3-bucket string bucket name of s2i s3 (default "s2i-binaries")
--s3-disable-SSL disable ssl (default true)
--s3-endpoint string Endpoint to access to s3 object storage service, if left blank, the following options will be ignored.
--s3-force-path-style force path style (default true)
--s3-region string Region of s3 that will access to, like us-east-1. (default "us-east-1")
--s3-secret-access-key string secret access key of s2i s3 (default "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY")
--s3-session-token string session token of s2i s3
--secure-port int secure port number
--servicemesh-prometheus-host string prometheus service for servicemesh
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when opening log files
--sonarqube-host string Sonarqube service address, if left empty, following sonarqube options will be ignored.
--sonarqube-token string Sonarqube service access token.
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
--tls-cert-file string tls cert file
--tls-private-key string tls private key
-v, --v Level number for the log level verbosity
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
2020/04/17 12:09:22 unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request