mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
When api-server is not avaiable, kubectl cluster-info still prints information like: the cluster is running at ...
This patch fixes this bug
This commit is contained in:
parent
a3d30dc939
commit
9407e2bb43
@ -92,8 +92,6 @@ func (o *ClusterInfoOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) err
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ClusterInfoOptions) Run() error {
|
func (o *ClusterInfoOptions) Run() error {
|
||||||
printService(o.Out, "Kubernetes master", o.Client.Host)
|
|
||||||
|
|
||||||
// TODO use generalized labels once they are implemented (#341)
|
// TODO use generalized labels once they are implemented (#341)
|
||||||
b := o.Builder.
|
b := o.Builder.
|
||||||
WithScheme(legacyscheme.Scheme).
|
WithScheme(legacyscheme.Scheme).
|
||||||
@ -105,6 +103,8 @@ func (o *ClusterInfoOptions) Run() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
printService(o.Out, "Kubernetes master", o.Client.Host)
|
||||||
|
|
||||||
services := r.Object.(*api.ServiceList).Items
|
services := r.Object.(*api.ServiceList).Items
|
||||||
for _, service := range services {
|
for _, service := range services {
|
||||||
var link string
|
var link string
|
||||||
|
Loading…
Reference in New Issue
Block a user