Skip to content

Commit

Permalink
UPdated the docs
Browse files Browse the repository at this point in the history
Signed-off-by: Dipankar Das <[email protected]>
  • Loading branch information
dipankardas011 committed Aug 24, 2024
1 parent 0938a03 commit 97bf30c
Show file tree
Hide file tree
Showing 59 changed files with 566 additions and 195 deletions.
27 changes: 14 additions & 13 deletions cli/cmd/switchCluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,25 @@ import (
)

var switchCluster = &cobra.Command{
Use: "switch-cluster",
Use: "connect-cluster",
Example: `
ksctl switch-context --provider civo --name <clustername> --region <region>
ksctl switch-context --provider local --name <clustername>
ksctl switch-context --provider azure --name <clustername> --region <region>
ksctl switch-context --provider ha-civo --name <clustername> --region <region>
ksctl switch-context --provider ha-azure --name <clustername> --region <region>
ksctl switch-context --provider ha-aws --name <clustername> --region <region>
ksctl switch-context --provider aws --name <clustername> --region <region>
ksctl connect-context --provider civo --name <clustername> --region <region>
ksctl connect --provider civo --name <clustername> --region <region>
ksctl switch --provider civo --name <clustername> --region <region>
ksctl connect --provider civo --name <clustername> --region <region>
ksctl connect-context --provider local --name <clustername>
ksctl connect-context --provider azure --name <clustername> --region <region>
ksctl connect-context --provider ha-civo --name <clustername> --region <region>
ksctl connect-context --provider ha-azure --name <clustername> --region <region>
ksctl connect-context --provider ha-aws --name <clustername> --region <region>
ksctl connect-context --provider aws --name <clustername> --region <region>
For Storage specific
ksctl switch-context -s store-local -p civo -n <clustername> -r <region>
ksctl switch-context -s external-store-mongodb -p civo -n <clustername> -r <region>
ksctl connect-context -s store-local -p civo -n <clustername> -r <region>
ksctl connect-context -s external-store-mongodb -p civo -n <clustername> -r <region>
`,
Aliases: []string{"switch", "access"},
Aliases: []string{"connect", "switch", "access"},
Short: "Use to switch between clusters",
Long: LongMessage("It is used to switch cluster with the given ClusterName from user."),
Run: func(cmd *cobra.Command, args []string) {
Expand Down Expand Up @@ -143,11 +146,9 @@ func shellAccess(log types.LoggerFactory) {
}
defer func() { _ = term.Restore(int(os.Stdin.Fd()), oldState) }()

// Print welcome message
fmt.Fprintln(ptmx, "echo Hi from Ksctl team! You are now in the shell session having cluster context.")
fmt.Fprintln(ptmx, "kubectl get nodes -owide")

// Copy stdin to ptmx, and ptmx to stdout
go func() { _, _ = io.Copy(ptmx, os.Stdin) }()
_, _ = io.Copy(os.Stdout, ptmx)
}
Expand Down
20 changes: 9 additions & 11 deletions gen/docs.md/ksctl.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ CLI tool for managing multiple K8s clusters

### Synopsis


░ ░░░░ ░░░ ░░░░ ░░░ ░░ ░░░░░░░
▒ ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒
▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
█ ████ ███ ████ ██████ █████ █

_ _ _
| | | | | |
| | _____ ___| |_| |
| |/ / __|/ __| __| |
| <\__ \ (__| |_| |
|_|\_\___/\___|\__|_|

CLI tool which can manage multiple K8s clusters
from local clusters to cloud provider specific clusters.
CLI tool which can manage multiple K8s clusters from local clusters to cloud provider specific clusters.

### Options

Expand All @@ -24,13 +22,13 @@ from local clusters to cloud provider specific clusters.

### SEE ALSO

* [ksctl connect-cluster](ksctl_connect-cluster.md) - Use to switch between clusters
* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster
* [ksctl cred](ksctl_cred.md) - Login to your Cloud-provider Credentials
* [ksctl delete-cluster](ksctl_delete-cluster.md) - Use to delete a cluster
* [ksctl get-clusters](ksctl_get-clusters.md) - Use to get clusters
* [ksctl info-cluster](ksctl_info-cluster.md) - Use to info cluster
* [ksctl self-update](ksctl_self-update.md) - update the ksctl cli
* [ksctl switch-cluster](ksctl_switch-cluster.md) - Use to switch between clusters
* [ksctl version](ksctl_version.md) - Print the version number of ksctl

###### Auto generated by spf13/cobra on 2-Aug-2024
###### Auto generated by spf13/cobra on 24-Aug-2024
59 changes: 59 additions & 0 deletions gen/docs.md/ksctl_connect-cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## ksctl connect-cluster

Use to switch between clusters

### Synopsis


░ ░░░░ ░░░ ░░░░ ░░░ ░░ ░░░░░░░
▒ ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒
▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
█ ████ ███ ████ ██████ █████ █

It is used to switch cluster with the given ClusterName from user.

```
ksctl connect-cluster [flags]
```

### Examples

```
ksctl connect-context --provider civo --name <clustername> --region <region>
ksctl connect --provider civo --name <clustername> --region <region>
ksctl switch --provider civo --name <clustername> --region <region>
ksctl connect --provider civo --name <clustername> --region <region>
ksctl connect-context --provider local --name <clustername>
ksctl connect-context --provider azure --name <clustername> --region <region>
ksctl connect-context --provider ha-civo --name <clustername> --region <region>
ksctl connect-context --provider ha-azure --name <clustername> --region <region>
ksctl connect-context --provider ha-aws --name <clustername> --region <region>
ksctl connect-context --provider aws --name <clustername> --region <region>
For Storage specific
ksctl connect-context -s store-local -p civo -n <clustername> -r <region>
ksctl connect-context -s external-store-mongodb -p civo -n <clustername> -r <region>
```

### Options

```
--feature-flags string Experimental Features: Supported values with comma seperated: [autoscale]
-h, --help help for connect-cluster
-m, --mode string Mode of access can be shell or k9s or none
-n, --name string Cluster Name (default "demo")
-p, --provider string Provider
-r, --region string Region
-s, --storage string storage provider
-v, --verbose int for verbose output
```

### SEE ALSO

* [ksctl](ksctl.md) - CLI tool for managing multiple K8s clusters

###### Auto generated by spf13/cobra on 24-Aug-2024
11 changes: 9 additions & 2 deletions gen/docs.md/ksctl_create-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ Use to create a cluster

### Synopsis

It is used to create cluster with the given name from user

░ ░░░░ ░░░ ░░░░ ░░░ ░░ ░░░░░░░
▒ ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒
▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
█ ████ ███ ████ ██████ █████ █

It is used to create cluster with the given name from user

### Examples

Expand All @@ -31,4 +38,4 @@ ksctl create --help
* [ksctl create-cluster ha-civo](ksctl_create-cluster_ha-civo.md) - Use to create a self-managed Highly Available cluster on Civo
* [ksctl create-cluster local](ksctl_create-cluster_local.md) - Use to create a kind cluster

###### Auto generated by spf13/cobra on 2-Aug-2024
###### Auto generated by spf13/cobra on 24-Aug-2024
12 changes: 9 additions & 3 deletions gen/docs.md/ksctl_create-cluster_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ Use to create a EKS cluster in Aws

### Synopsis

It is used to create cluster with the given name from user

░ ░░░░ ░░░ ░░░░ ░░░ ░░ ░░░░░░░
▒ ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒
▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
█ ████ ███ ████ ██████ █████ █

It is used to create cluster with the given name from user

```
ksctl create-cluster aws [flags]
Expand All @@ -21,7 +28,6 @@ ksctl create-cluster aws -n demo -r ap-south-1 -s store-local --nodeSizeMP t2.mi
### Options

```
--apps string Pre-Installed Applications
--bootstrap string Kubernetes Bootstrap
--cni string CNI
--feature-flags string Experimental Features: Supported values with comma seperated: [autoscale]
Expand All @@ -40,4 +46,4 @@ ksctl create-cluster aws -n demo -r ap-south-1 -s store-local --nodeSizeMP t2.mi

* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster

###### Auto generated by spf13/cobra on 2-Aug-2024
###### Auto generated by spf13/cobra on 24-Aug-2024
12 changes: 9 additions & 3 deletions gen/docs.md/ksctl_create-cluster_azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ Use to create a AKS cluster in Azure

### Synopsis

It is used to create cluster with the given name from user

░ ░░░░ ░░░ ░░░░ ░░░ ░░ ░░░░░░░
▒ ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒
▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
█ ████ ███ ████ ██████ █████ █

It is used to create cluster with the given name from user

```
ksctl create-cluster azure [flags]
Expand All @@ -21,7 +28,6 @@ ksctl create-cluster azure -n demo -r eastus -s store-local --nodeSizeMP Standar
### Options

```
--apps string Pre-Installed Applications
--bootstrap string Kubernetes Bootstrap
--cni string CNI
--feature-flags string Experimental Features: Supported values with comma seperated: [autoscale]
Expand All @@ -40,4 +46,4 @@ ksctl create-cluster azure -n demo -r eastus -s store-local --nodeSizeMP Standar

* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster

###### Auto generated by spf13/cobra on 2-Aug-2024
###### Auto generated by spf13/cobra on 24-Aug-2024
12 changes: 9 additions & 3 deletions gen/docs.md/ksctl_create-cluster_civo.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ Use to create a Civo managed k3s cluster

### Synopsis

It is used to create cluster with the given name from user

░ ░░░░ ░░░ ░░░░ ░░░ ░░ ░░░░░░░
▒ ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒
▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
█ ████ ███ ████ ██████ █████ █

It is used to create cluster with the given name from user

```
ksctl create-cluster civo [flags]
Expand All @@ -21,7 +28,6 @@ ksctl create-cluster civo --name demo --region LON1 --storage store-local --node
### Options

```
--apps string Pre-Installed Applications
--bootstrap string Kubernetes Bootstrap
--cni string CNI
--feature-flags string Experimental Features: Supported values with comma seperated: [autoscale]
Expand All @@ -40,4 +46,4 @@ ksctl create-cluster civo --name demo --region LON1 --storage store-local --node

* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster

###### Auto generated by spf13/cobra on 2-Aug-2024
###### Auto generated by spf13/cobra on 24-Aug-2024
14 changes: 10 additions & 4 deletions gen/docs.md/ksctl_create-cluster_ha-aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ Use to create a self-managed Highly Available cluster on AWS

### Synopsis

It is used to create cluster with the given name from user.

░ ░░░░ ░░░ ░░░░ ░░░ ░░ ░░░░░░░
▒ ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒
▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
█ ████ ███ ████ ██████ █████ █

It is used to create cluster with the given name from user.

```
ksctl create-cluster ha-aws [flags]
Expand All @@ -14,14 +21,13 @@ ksctl create-cluster ha-aws [flags]

```
ksctl create-cluster ha-aws -n demo -r us-east-1 --bootstrap k3s -s store-local --nodeSizeCP t2.medium --nodeSizeWP t2.medium --nodeSizeLB t2.micro --nodeSizeDS t2.small --noWP 1 --noCP 3 --noDS 3
ksctl create-cluster ha-aws -n demo -r us-east-1 --bootstrap k3s -s store-local --nodeSizeCP t2.medium --nodeSizeWP t2.medium --nodeSizeLB t2.micro --nodeSizeDS t2.small --noWP 1 --noCP 3 --noDS 3 --cni [email protected]
```

### Options

```
--apps string Pre-Installed Applications
--bootstrap string Kubernetes Bootstrap
--cni string CNI
--feature-flags string Experimental Features: Supported values with comma seperated: [autoscale]
Expand All @@ -46,4 +52,4 @@ ksctl create-cluster ha-aws -n demo -r us-east-1 --bootstrap k3s -s store-local
* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster
* [ksctl create-cluster ha-aws add-nodes](ksctl_create-cluster_ha-aws_add-nodes.md) - Use to add more worker nodes in self-managed Highly-Available cluster on Aws

###### Auto generated by spf13/cobra on 2-Aug-2024
###### Auto generated by spf13/cobra on 24-Aug-2024
6 changes: 2 additions & 4 deletions gen/docs.md/ksctl_create-cluster_ha-aws_add-nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,25 @@ ksctl create-cluster ha-aws add-nodes [flags]

```
ksctl create ha-aws add-nodes -n demo -r ap-south-1 -s store-local --noWP 3 --nodeSizeWP t2.medium --bootstrap kubeadm # Here the noWP is the desired count of workernodes
ksctl create ha-aws add-nodes -n demo -r ap-south-1 -s store-local --noWP 3 --nodeSizeWP t2.medium # Here the noWP is the desired count of workernodes
```

### Options

```
--bootstrap string Kubernetes Bootstrap
-h, --help help for add-nodes
-n, --name string Cluster Name (default "demo")
--noWP int Number of WorkerPlane Nodes (default -1)
--nodeSizeWP string Node size of self-managed workerplane nodes
-r, --region string Region
-s, --storage string storage provider
-v, --verbose int for verbose output
--version string Kubernetes Version
-y, --yes approval to avoid showMsg (default true)
```

### SEE ALSO

* [ksctl create-cluster ha-aws](ksctl_create-cluster_ha-aws.md) - Use to create a self-managed Highly Available cluster on AWS

###### Auto generated by spf13/cobra on 2-Aug-2024
###### Auto generated by spf13/cobra on 24-Aug-2024
14 changes: 10 additions & 4 deletions gen/docs.md/ksctl_create-cluster_ha-azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ Use to create a self-managed Highly-Available cluster on Azure

### Synopsis

It is used to create cluster with the given name from user

░ ░░░░ ░░░ ░░░░ ░░░ ░░ ░░░░░░░
▒ ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒
▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓
█ ████ ███ ████ ██████ █████ █

It is used to create cluster with the given name from user

```
ksctl create-cluster ha-azure [flags]
Expand All @@ -15,14 +22,13 @@ ksctl create-cluster ha-azure [flags]
```
ksctl create-cluster ha-azure --name demo --region eastus --bootstrap k3s --storage store-local --nodeSizeCP Standard_F2s --nodeSizeWP Standard_F2s --nodeSizeLB Standard_F2s --nodeSizeDS Standard_F2s --noWP 1 --noCP 3 --noDS 3
ksctl create-cluster ha-azure --name demo --region eastus --bootstrap kubeadm --storage store-local --nodeSizeCP Standard_F2s --nodeSizeWP Standard_F4s --nodeSizeLB Standard_F2s --nodeSizeDS Standard_F2s --noWP 1 --noCP 3 --noDS 3
ksctl create-cluster ha-azure --name demo --region eastus --bootstrap kubeadm --storage store-local --nodeSizeCP Standard_F2s --nodeSizeWP Standard_F4s --nodeSizeLB Standard_F2s --nodeSizeDS Standard_F2s --noWP 1 --noCP 3 --noDS 3 --cni [email protected]
```

### Options

```
--apps string Pre-Installed Applications
--bootstrap string Kubernetes Bootstrap
--cni string CNI
--feature-flags string Experimental Features: Supported values with comma seperated: [autoscale]
Expand All @@ -47,4 +53,4 @@ ksctl create-cluster ha-azure --name demo --region eastus --bootstrap kubeadm --
* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster
* [ksctl create-cluster ha-azure add-nodes](ksctl_create-cluster_ha-azure_add-nodes.md) - Use to add more worker nodes in self-managed Highly-Available cluster on Azure

###### Auto generated by spf13/cobra on 2-Aug-2024
###### Auto generated by spf13/cobra on 24-Aug-2024
6 changes: 2 additions & 4 deletions gen/docs.md/ksctl_create-cluster_ha-azure_add-nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ ksctl create-cluster ha-azure add-nodes [flags]

```
ksctl create ha-azure add-nodes -n demo -r eastus -s store-local --noWP 3 --nodeSizeWP Standard_F2s --bootstrap kubeadm # Here the noWP is the desired count of workernodes
ksctl create ha-azure add-nodes -n demo -r eastus -s store-local --noWP 3 --nodeSizeWP Standard_F2s # Here the noWP is the desired count of workernodes
```

### Options

```
--bootstrap string Kubernetes Bootstrap
--feature-flags string Experimental Features: Supported values with comma seperated: [autoscale]
-h, --help help for add-nodes
-n, --name string Cluster Name (default "demo")
Expand All @@ -30,12 +29,11 @@ ksctl create ha-azure add-nodes -n demo -r eastus -s store-local --noWP 3 --node
-r, --region string Region
-s, --storage string storage provider
-v, --verbose int for verbose output
--version string Kubernetes Version
-y, --yes approval to avoid showMsg (default true)
```

### SEE ALSO

* [ksctl create-cluster ha-azure](ksctl_create-cluster_ha-azure.md) - Use to create a self-managed Highly-Available cluster on Azure

###### Auto generated by spf13/cobra on 2-Aug-2024
###### Auto generated by spf13/cobra on 24-Aug-2024
Loading

0 comments on commit 97bf30c

Please sign in to comment.