Sveltos Visibility
Sveltoctl Visibility
sveltosctl nicely displays the add-ons deployed in every Sveltos managed Kubernetes cluster.
show addons
show addons can be used to display a list of Kubernetes add-ons deployed in each clusters by Sveltos.
The displayed information are:
- The CAPI/Sveltos Cluster in the form namespace/name;
- Resource/helm chart information;
- Time resource/helm chart was deployed;
- ClusterProfiles that caused resource/helm chart to be deployed in the cluster.
$ sveltosctl show addons
+-------------------------------------+---------------+-----------+----------------+---------+-------------------------------+------------------+
| CLUSTER | RESOURCE TYPE | NAMESPACE | NAME | VERSION | TIME | CLUSTER PROFILE |
+-------------------------------------+---------------+-----------+----------------+---------+-------------------------------+------------------+
| default/sveltos-management-workload | helm chart | kyverno | kyverno-latest | v2.5.0 | 2022-09-30 11:48:45 -0700 PDT | clusterprofile1 |
| default/sveltos-management-workload | :Pod | default | nginx | N/A | 2022-09-30 13:41:05 -0700 PDT | clusterprofile2 |
+-------------------------------------+---------------+-----------+----------------+---------+-------------------------------+------------------+
show addons command allows filtering by:
- clusters' namespace
- clusters' name
- ClusterProfile
- resource type (Helm releases only, or Kubernetes resources only)
$ sveltosctl show addons --help
Usage:
sveltosctl show features [options] [--namespace=<name>] [--cluster=<name>] [--clusterprofile=<name>] [--helm-charts] [--resources] [--verbose]
--namespace=<name> Show features deployed in clusters in this namespace. If not specified all namespaces are considered.
--cluster=<name> Show features deployed in cluster with name. If not specified all cluster names are considered.
--clusterprofile=<name> Show features deployed because of this clusterprofile. If not specified all clusterprofile names are considered.
--helm-charts Show only Helm releases. Cannot be combined with --resources.
--resources Show only Kubernetes resources. Cannot be combined with --helm-charts.
show resources
Using Projectsveltos can facilitate the display of information about resources in managed clusters.
Checkout the observability section for more details.
$ sveltosctl show resources --kind=pod --namespace=nginx
+-----------------------------+---------------+-----------+-----------------------------------+-------------------+
| CLUSTER | GVK | NAMESPACE | NAME | MESSAGE |
+-----------------------------+---------------+-----------+-----------------------------------+-------------------+
| default/clusterapi-workload | /v1, Kind=Pod | nginx | nginx-deployment-85996f8dbd-7tctq | Deployment: nginx |
| | | nginx | nginx-deployment-85996f8dbd-tz4gd | Deployment: nginx |
| gke/pre-production | | nginx | nginx-deployment-c4f7848dc-6jtwg | Deployment: nginx |
| | | nginx | nginx-deployment-c4f7848dc-trllk | Deployment: nginx |
| gke/production | | nginx | nginx-deployment-676cf9b46d-k84pb | Deployment: nginx |
| | | nginx | nginx-deployment-676cf9b46d-mmbl4 | Deployment: nginx |
+-----------------------------+---------------+-----------+-----------------------------------+-------------------+
show usage
show usage displays below information:
- Which clusters are currently a match for a ClusterProfile;
- For ConfigMap/Secret list of clusters where their content is currently deployed.
Such information is useful to see what clusters would be affected by a change before making such a change.
$ sveltosctl show usage
+----------------+--------------------+----------------------------+-------------------------------------+
| RESOURCE KIND | RESOURCE NAMESPACE | RESOURCE NAME | CLUSTERS |
+----------------+--------------------+----------------------------+-------------------------------------+
| ClusterProfile | | kyverno | default/sveltos-management-workload |
| ConfigMap | default | kyverno-disallow-gateway | default/sveltos-management-workload |
+----------------+--------------------+----------------------------+-------------------------------------+
show classifier-labels
show classifier-labels displays labels that Classifier and ManagementClusterClassifier instances are actively managing on each cluster, along with the name of the instance that owns each label.
The displayed information are:
- The CAPI/Sveltos Cluster in the form namespace/name;
- Label key and value;
- The name of the
ClassifierorManagementClusterClassifierinstance managing the label; - The type (
ClassifierorManagementClusterClassifier).
$ sveltosctl show classifier-labels
+-----------------------------+-------------+------------+-------------------------+----------------------------+
| CLUSTER | KEY | VALUE | CLASSIFIER/MCC | TYPE |
+-----------------------------+-------------+------------+-------------------------+----------------------------+
| capi-clusters/prod-eu1 | env | production | tag-production-clusters | ManagementClusterClassifier|
| capi-clusters/prod-eu1 | cost-centre | platform | tag-production-clusters | ManagementClusterClassifier|
| capi-clusters/staging-eu1 | gatekeeper | v3-10 | deploy-gatekeeper-3-10 | Classifier |
+-----------------------------+-------------+------------+-------------------------+----------------------------+
show classifier-labels allows filtering by:
- clusters' namespace
- clusters' name
Pass --warnings to display only label conflicts, where two instances are competing to own the same label key on the same cluster:
$ sveltosctl show classifier-labels --warnings
+-----------------------------+------+------------------+------------+----------------------------------------------+
| CLUSTER | KEY | WANTED BY | TYPE | CONFLICT |
+-----------------------------+------+------------------+------------+----------------------------------------------+
| capi-clusters/prod-eu1 | env | other-classifier | Classifier | label already managed by tag-production-... |
+-----------------------------+------+------------------+------------+----------------------------------------------+
show admin-rbac
show admin-rbac can be used to display permissions granted to tenant admins in each managed clusters by the platform admin.
If we have two clusters, a ClusterAPI powered one and a SveltosCluster, both matching label selector
env=internal and we post RoleRequests, we get:
$ sveltosctl show admin-rbac
+---------------------------------------------+-------+----------------+------------+-----------+----------------+-------+
| CLUSTER | ADMIN | NAMESPACE | API GROUPS | RESOURCES | RESOURCE NAMES | VERBS |
+---------------------------------------------+-------+----------------+------------+-----------+----------------+-------+
| Cluster:default/sveltos-management-workload | eng | build | * | * | * | * |
| Cluster:default/sveltos-management-workload | eng | ci-cd | * | * | * | * |
| Cluster:default/sveltos-management-workload | hr | human-resource | * | * | * | * |
| SveltosCluster:gke/prod-cluster | eng | build | * | * | * | * |
| SveltosCluster:gke/prod-cluster | eng | ci-cd | * | * | * | * |
| SveltosCluster:gke/prod-cluster | hr | human-resource | * | * | * | * |
+---------------------------------------------+-------+----------------+------------+-----------+----------------+-------+
show helm-updates
show helm-updates displays, for every Helm release Sveltos manages in a cluster, whether a newer version or a newer same-minor patch is currently published upstream, based on addon-controller's periodic check (see Detecting Newer Helm Chart Versions).
The displayed information are:
- The CAPI/Sveltos Cluster in the form namespace/name;
- Release namespace;
- Release name;
- Currently deployed version;
- Newer version, if one is published upstream;
- Newer same-minor patch version, if one is published upstream.
$ sveltosctl show helm-updates --namespace=default --cluster=clusterapi-workload
┌─────────────────────────────┬──────────────────────┬────────────────┬─────────────────┬───────────────┬─────────────────────┐
│ CLUSTER │ NAMESPACE │ RELEASE NAME │ CURRENT VERSION │ NEWER VERSION │ NEWER PATCH VERSION │
├─────────────────────────────┼──────────────────────┼────────────────┼─────────────────┼───────────────┼─────────────────────┤
│ default/clusterapi-workload │ nats │ nats │ 1.2.9 │ 2.14.2 │ 1.2.11 │
│ default/clusterapi-workload │ prometheus │ prometheus │ 26.0.0 │ 29.18.0 │ 26.0.1 │
│ default/clusterapi-workload │ grafana │ grafana │ 11.3.6 │ 12.8.0 │ 11.3.8 │
│ default/clusterapi-workload │ cert-manager │ cert-manager │ v1.19.4 │ 1.21.0 │ 1.19.6 │
└─────────────────────────────┴──────────────────────┴────────────────┴─────────────────┴───────────────┴─────────────────────┘
A release with no entry in NEWER VERSION or NEWER PATCH VERSION is confirmed up to date as of the last check; a release Sveltos hasn't checked yet simply doesn't appear.
show helm-updates allows filtering by:
- clusters' namespace
- clusters' name
- clusters' type (
CapiorSveltos)
$ sveltosctl show helm-updates --help
Usage:
sveltosctl show helm-updates [options] [--namespace=<name>] [--cluster=<name>] [--cluster-type=<type>] [--verbose]
--namespace=<name> Show outdated helm charts deployed in clusters in this namespace.
If not specified all namespaces are considered.
--cluster=<name> Show outdated helm charts deployed in cluster with name.
If not specified all cluster names are considered.
--cluster-type=<type> Show outdated helm charts deployed in cluster with this type
(Capi or Sveltos). If not specified all cluster types are considered.