Quick Start
Prerequisitesâ
- Ensure kubectl is installed.
- Ensure helm is installed.
- If you do not have a ready-made cluster, you still need a kind.
Create Cluster (Optional)â
First, if you do not have a ready-made cluster, you need to create a kubernetes cluster in your local environment with the kind
tool. Follow these steps:
Create a cluster. You can create a cluster named
demo-cluster
using the following command:kind create cluster --name demo-cluster
This will create a new Kubernetes cluster in your local Docker environment. Wait for a moment until the cluster creation is complete.
Verify that the cluster is running properly by executing the command:
kubectl cluster-info
If everything is set up correctly, you'll see information about your Kubernetes cluster.
Installationâ
To install Karpor, execute the following command in your terminal:
helm repo add kusionstack https://kusionstack.github.io/charts
helm repo update
helm install karpor kusionstack/karpor
For more installation details, please refer to the Installation Documentation.
Access Karpor Dashboardâ
Run the following command to access the Karpor service running in the cluster:
kubectl -n karpor port-forward service/karpor-server 7443:7443
After executing this command, if you access port 7443 on your local machine, the traffic will be forwarded to port 7443 of the karpor-server service in the Kubernetes cluster.
Open your browser and enter the following URL:
https://127.0.0.1:7443
This will open the Karpor Web interface. đ
Congratulations! đ You have successfully installed Karpor. Now you can start using Karpor to explore and gain insights into resources across multiple clusters.
Create Access Tokenâ
Before registering clusters, you need to create an access token to log in to the Karpor Web interface. Here are the brief steps to create a token:
- Export the KubeConfig of the Hub Cluster:
kubectl get configmap karpor-kubeconfig -n karpor -o go-template='{{.data.config}}' > $HOME/.kube/karpor-hub-cluster.kubeconfig
- Create ServiceAccount and ClusterRoleBinding:
export KUBECONFIG=$HOME/.kube/karpor-hub-cluster.kubeconfig
kubectl create serviceaccount karpor-admin
kubectl create clusterrolebinding karpor-admin --clusterrole=karpor-admin --serviceaccount=default:karpor-admin
- Create token:
kubectl create token karpor-admin --duration=1000h
Copy the generated token, which will be used later to log in to the Karpor Web interface.
For detailed instructions on creating tokens, please refer to the How to Create Token documentation.
Register Clusterâ
To register a new cluster with Karpor, follow these steps:
Log in to the Karpor Web interface using the token created in the previous step.
Navigate to the
Cluster Management
section in the Karpor UI.Click on the
Register Cluster
button.Follow the on-screen instructions to complete the registration process.
When registering a cluster, please note the following:
- The cluster name must be unique and cannot be changed once created.
- Ensure that there is network connectivity between the server address (target cluster address) in the uploaded cluster certificate and Karpor.
- If you deployed Karpor in a local cluster and want to register that local cluster, you need to modify the server address in the cluster certificate to the internal cluster address
https://kubernetes.default.svc.cluster.local:443
to ensure that Karpor can directly access the target cluster. - If you want to register an EKS cluster, additional configuration of the KubeConfig is required, including adding the
env
,interactiveMode
, andprovideClusterInfo
fields. For detailed steps, please refer to the "Registering an EKS Cluster" section in the Multi-cluster Management documentation.
After completing the above steps, click the
Validate and Submit
button.
An example of the Register Cluster
page can be found in the image below:
For a more detailed explanation of the registration process, refer to the Multi-cluster management Documentation.
Search Resourcesâ
Karpor provides a powerful search feature that allows you to quickly find resources across the registered clusters. To use this feature:
- Go to the
Search
page within the Karpor UI. - Enter the search criteria for the resources you are looking for.
Here is an example of the Search
page:
To learn more about the search capabilities and how to use them effectively, check out the Search Methods Documentation.
Gain Insight into Resourcesâ
By clicking on a result from your search, you can delve into the Insight
page, where you'll be able to investigate risks related to the resource, see a topological view with its relevant resources, and examine its detailed information.
Here are examples for what you can find on the Insight page:
Conclusionâ
Please note that this guide only provides a quick start for Karpor, and you may need to refer to additional documentations and resources to configure and use other features.
If you have any questions or concerns, check out the official documentation of Karpor or seek relevant support.
Next Stepâ
- Learn Karpor's Architecture and Glossary.
- View User Guide to look on more of what you can achieve with Karpor.