Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 1 addition & 20 deletions cmd/kosli/snapshotECS.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ All filtering options are case-sensitive.
The reported data includes cluster and service names, container image digests and creation timestamps.` + awsAuthDesc

const snapshotECSExample = `
###### Authentication to AWS ######

# authentication to AWS using flags

kosli snapshot ecs yourEnvironmentName \
--aws-key-id yourAWSAccessKeyID \
--aws-secret-key yourAWSSecretAccessKey \
Expand All @@ -36,7 +33,6 @@ kosli snapshot ecs yourEnvironmentName \
--org yourOrgName

# authentication to AWS using env variables

export AWS_ACCESS_KEY_ID=yourAWSAccessKeyID
export AWS_SECRET_ACCESS_KEY=yourAWSSecretAccessKey
export AWS_REGION=yourAWSRegion
Expand All @@ -45,16 +41,11 @@ kosli snapshot ecs yourEnvironmentName \
--api-token yourAPIToken \
--org yourOrgName

###### reporting everything running in all clusters in a given AWS account ######

# reporting everything running in all clusters in a given AWS account
kosli snapshot ecs my-env \
--api-token yourAPIToken \
--org yourOrgName

###### filtering which ECS clusters to snapshot ######

########### including clusters

# include clusters matching a name in the AWS account
kosli snapshot ecs my-env --clusters my-cluster ...

Expand All @@ -64,8 +55,6 @@ kosli snapshot ecs my-env --clusters-regex "my-cluster-*" ...
# include clusters matching a list of names in the AWS account
kosli snapshot ecs my-env --clusters my-cluster1,my-cluster2 ...

########### excluding clusters

# exclude clusters matching a name in the AWS account
kosli snapshot ecs my-env --exclude my-cluster ...

Expand All @@ -75,12 +64,6 @@ kosli snapshot ecs my-env --exclude-regex "my-cluster-*" ...
# exclude clusters matching a list of names in the AWS account
kosli snapshot ecs my-env --exclude my-cluster1,my-cluster2 ...



###### filtering which ECS services to snapshot ######

########### including services

# include Services matching a name in one cluster
kosli snapshot ecs my-env --clusters my-cluster --services backend-app ...

Expand All @@ -96,8 +79,6 @@ kosli snapshot ecs my-env --services backend-app ...
# include Services matching a list of names in all clusters in the AWS account
kosli snapshot ecs my-env --services backend-app,frontend-app ...

########### excluding services

# exclude Services matching a pattern in one cluster
kosli snapshot ecs my-env --clusters my-cluster --exclude-services-regex "backend-*" ...

Expand Down
3 changes: 1 addition & 2 deletions cmd/kosli/snapshotK8S.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ kosli snapshot k8s yourEnvironmentName \
--api-token yourAPIToken \
--org yourOrgName

# report what is running in an entire cluster using kubeconfig at $HOME/.kube/config
(with global flags defined in environment or in a config file):
# report what is running in an entire cluster using kubeconfig at $HOME/.kube/config (with global flags defined in environment or in a config file):
export KOSLI_API_TOKEN=yourAPIToken
export KOSLI_ORG=yourOrgName

Expand Down