Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions cli/cmd/cluster_kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/pkg/errors"
"github.com/replicatedhq/replicated/pkg/platformclient"
"github.com/replicatedhq/replicated/pkg/types"
"github.com/spf13/cobra"
"k8s.io/client-go/tools/clientcmd"
)
Expand Down Expand Up @@ -91,17 +90,6 @@ func (r *runners) kubeconfigCluster(_ *cobra.Command, args []string) error {
return errors.New("must provide cluster id or name")
}

cluster, err := r.kotsAPI.GetCluster(clusterID)
if errors.Cause(err) == platformclient.ErrForbidden {
return ErrCompatibilityMatrixTermsNotAccepted
} else if err != nil {
return errors.Wrap(err, "get cluster")
}

if cluster.Status != types.ClusterStatusRunning {
return errors.Errorf("cluster %s is not running, current status is %s", clusterID, cluster.Status)
}

kubeconfig, err := r.kotsAPI.GetClusterKubeconfig(clusterID)
if errors.Cause(err) == platformclient.ErrForbidden {
return ErrCompatibilityMatrixTermsNotAccepted
Expand Down
Loading