Skip to content

Commit

Permalink
chore: add note for add cloud aws (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny0826 committed Jul 3, 2023
1 parent 2b4cb48 commit 1549f02
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/cloud_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"errors"
"fmt"

"github.com/mgutz/ansi"

"github.com/spf13/cobra"
"github.com/sunny0826/kubecm/pkg/cloud"
"k8s.io/client-go/tools/clientcmd"
Expand Down Expand Up @@ -215,7 +217,13 @@ func (ca *CloudAddCommand) runCloudAdd(cmd *cobra.Command, args []string) error
if err != nil {
return err
}
return AddToLocal(newConfig, fmt.Sprintf("aws-%s", clusterID), "", cover)
err = AddToLocal(newConfig, fmt.Sprintf("aws-%s", clusterID), "", cover)
if err != nil {
return err
}
fmt.Printf("%s: %s\n",
ansi.Color("Note", "blue"),
ansi.Color(" please install the AWS CLI before normal use.", "white+h"))
}
return nil
}
Expand All @@ -240,6 +248,7 @@ export RANCHER_SERVER_URL=https://xxx
export RANCHER_API_KEY=YOUR_API_KEY
# Set env AWS secret key
# Note: Please install the AWS CLI before normal use.
export AWS_ACCESS_KEY_ID=YOUR_AKID
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY
Expand Down

0 comments on commit 1549f02

Please sign in to comment.