Skip to content

Commit

Permalink
Add the install and the sveltosctl into a new section with the name G…
Browse files Browse the repository at this point in the history
…etting Started (#247)

Co-authored-by: egrosdou <egrosdou@cisco.com>
  • Loading branch information
egrosdou01 and egrosdou authored Mar 18, 2024
1 parent c65e2fe commit d77e7e7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ spec:
targetNamespace: eng
```
Full examples can be found [here](../addons/kustomize.md).
Full examples can be found [here](../../addons/kustomize.md).
ClusterProfile can reference:
Expand All @@ -119,4 +119,4 @@ ClusterProfile can reference:
5. Secret (type addons.projectsveltos.io/cluster-profile) whose Data section contains __kustomize.tar.gz__ entry with tar.gz of kustomize directory;
## Carvel ytt and Jsonnet
Sveltos offers support for Carvel ytt and Jsonnet as tools to define add-ons that can be deployed in a managed cluster. For additional information, please consult the [Carvel ytt](../template/ytt_extension.md) and [Jsonnet](../template/jsonnet_extension.md) sections.
Sveltos offers support for Carvel ytt and Jsonnet as tools to define add-ons that can be deployed in a managed cluster. For additional information, please consult the [Carvel ytt](../../template/ytt_extension.md) and [Jsonnet](../../template/jsonnet_extension.md) sections.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
[sveltoctl](https://github.com/projectsveltos/sveltosctl "Sveltos CLI") snapshot diff can be used to display all the configuration changes between two snapshots:
```
$ kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2022-10-10:22:00:00 --to-sample=2022-10-10:23:00:00
$ ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2022-10-10:22:00:00 --to-sample=2022-10-10:23:00:00
+-------------------------------------+--------------------------+-----------+----------------+----------+------------------------------------+
| CLUSTER | RESOURCE TYPE | NAMESPACE | NAME | ACTION | MESSAGE |
+-------------------------------------+--------------------------+-----------+----------------+----------+------------------------------------+
Expand All @@ -74,15 +74,15 @@ $ kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot diff
If resources contained in Secrets/ConfigMaps referenced by ClusterProfile were modified, the option *raw-diff* can be used to determine what changed.

```
$ kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2023-01-17:14:56:00 --to-sample=2023-01-17:15:56:00
$ ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2023-01-17:14:56:00 --to-sample=2023-01-17:15:56:00
+-------------------------------------------+--------------------------+-----------+-----------------------+----------+--------------------------------+
| CLUSTER | RESOURCE TYPE | NAMESPACE | NAME | ACTION | MESSAGE |
+-------------------------------------------+--------------------------+-----------+-----------------------+----------+--------------------------------+
| default/capi--sveltos-management-workload | kyverno.io/ClusterPolicy | | add-default-resources | modified | use --raw-diff option to see |
| | | | | | diff |
+-------------------------------------------+--------------------------+-----------+-----------------------+----------+--------------------------------+
kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2023-01-17:14:56:00 --to-sample=2023-01-17:15:56:00 --raw-diff
$ ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2023-01-17:14:56:00 --to-sample=2023-01-17:15:56:00 --raw-diff
--- kyverno.io/ClusterPolicy add-default-resources from /snapshot/hourly/2023-01-17:14:56:00
+++ kyverno.io/ClusterPolicy add-default-resources from /snapshot/hourly/2023-01-17:15:56:00
@@ -37,7 +37,8 @@
Expand Down Expand Up @@ -132,9 +132,9 @@ $ wget https://raw.githubusercontent.com/projectsveltos/sveltos/main/docs/assets
$ kubectl create configmap frontend --from-file frontend.yaml
```

The [database.yaml](../assets/snapshot_example/database.yaml) ConfigMap contains the definition of a single replica Redis Pod, exposed via a service.
The [database.yaml](../../assets/snapshot_example/database.yaml) ConfigMap contains the definition of a single replica Redis Pod, exposed via a service.

The [frontend.yaml](../assets/snapshot_example/frontend.yaml) ConfigMap contains the definition of the guestbook application. The guestbook app uses a PHP frontend that is configured to communicate with either the Redis follower or leader Services, depending on whether the request is a read or a write.
The [frontend.yaml](../../assets/snapshot_example/frontend.yaml) ConfigMap contains the definition of the guestbook application. The guestbook app uses a PHP frontend that is configured to communicate with either the Redis follower or leader Services, depending on whether the request is a read or a write.

Once the ConfigMaps have been created, you can create a ClusterProfile instance:

Expand Down Expand Up @@ -168,12 +168,12 @@ $ KUBECONFIG=test/fv/workload_kubeconfig kubectl port-forward -n test service/fr

Load the page http://localhost:8080 in your browser to view your guestbook

![Guestbook](../assets/snapshot_example/guestbook.png)
![Guestbook](../../assets/snapshot_example/guestbook.png)

The Sveltos snapshot feature allows you to take snapshots of your Kubernetes configuration at regular intervals. This can be useful for tracking changes of the configuration over time, or for debugging purposes.

```
kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot list
$ ./sveltosctl snapshot list
+-----------------+---------------------+
| SNAPSHOT POLICY | DATE |
+-----------------+---------------------+
Expand All @@ -191,7 +191,7 @@ Entries in the database are not visible anymore. Of course we can debug this iss
But if we simply want to see what has changed we can take a new snapshot

```
$ kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot list
$ ./sveltosctl snapshot list
+-----------------+---------------------+
| SNAPSHOT POLICY | DATE |
+-----------------+---------------------+
Expand All @@ -203,7 +203,7 @@ $ kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot list
and then look at the configuration differences

```
$ kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2023-08-26:05:00:00 --to-sample=2023-08-26:05:20:00
$ ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2023-08-26:05:00:00 --to-sample=2023-08-26:05:20:00
+-----------------------------------+---------------+-----------+----------------+----------+--------------------------------+
| CLUSTER | RESOURCE TYPE | NAMESPACE | NAME | ACTION | MESSAGE |
+-----------------------------------+---------------+-----------+----------------+----------+--------------------------------+
Expand All @@ -213,7 +213,7 @@ $ kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot diff
```

```
$ kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2023-08-26:05:00:00 --to-sample=2023-08-26:05:20:00 --raw-diff
$ ./sveltosctl snapshot diff --snapshot=hourly --from-sample=2023-08-26:05:00:00 --to-sample=2023-08-26:05:20:00 --raw-diff
--- /Service test/redis-follower from /collection/snapshot/hourly/2023-08-26:05:00:00
+++ /Service test/redis-follower from /collection/snapshot/hourly/2023-08-26:05:20:00
@@ -13,7 +13,7 @@
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To do that, add the below label to the Techsupport instance created by the tenan
projectsveltos.io/admin-name: <admin>
```

Sveltos will make sure the tenant admin collects what it has been [authorized to by platform admin](../features/multi-tenancy.md).
Sveltos will make sure the tenant admin collects what it has been [authorized to by platform admin](../../features/multi-tenancy.md).


## Techsupport CRD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Usage:

Using Projectsveltos can facilitate the display of information about resources in managed clusters.

Checkout the [observability section](../observability/display_resources.md) for more details.
Checkout the [observability section](../../observability/display_resources.md) for more details.

```bash
$ sveltosctl show resources --kind=pod --namespace=nginx
Expand Down
17 changes: 9 additions & 8 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ nav:
- Platform Administrators, Multicloud and Add-ons: 'use_cases/use_case_platform_admin_multicloud.md'
- Platform Administrators and Multitenancy: 'use_cases/use_case_multitenancy.md'
- Sveltos and Flux Integration: 'use_cases/use_case_flux_integration.md'
- Installation:
- Quick Start: 'install/quick_start.md'
- Install: 'install/install.md'
- Sveltosctl:
- Sveltosctl: 'sveltosctl/sveltosctl.md'
- Visibility: 'sveltosctl/visibility.md'
- Tech support: 'sveltosctl/techsupport.md'
- Snapshot: 'sveltosctl/snapshot.md'
- Getting Started:
- Installation:
- Quick Start: 'getting_started/install/quick_start.md'
- Install: 'getting_started/install/install.md'
- Sveltosctl:
- Sveltosctl: 'getting_started/sveltosctl/sveltosctl.md'
- Visibility: 'getting_started/sveltosctl/visibility.md'
- Tech support: 'getting_started/sveltosctl/techsupport.md'
- Snapshot: 'getting_started/sveltosctl/snapshot.md'
- Register Clusters:
- Register Cluster: 'register/register-cluster.md'
- Register Management Cluster: 'register/register_management_cluster.md'
Expand Down

0 comments on commit d77e7e7

Please sign in to comment.