Istio is an open-source service mesh that provides a uniform way to connect, manage, and secure microservices.
Using Port's Kubernetes Exporter, you can keep track of all Istio resources across your different clusters and export all of the data to Port. You will use built in metadata from your kubernetes resources and CRDs to create Entities in Port and keep track of their state.
Get to know the basics of our Kubernetes exporter here!
- Helm must be installed to use the chart. Please refer to Helm's documentation to get started;
jqcommand must installed;
yqcommand must installed;
kubectlcommand must be installed;
- Have your Port credentials ready.
In this use-case, you will use a custom bash script which will assist you in the process of installing Port's K8s exporter.
For more information about the k8s exporter installation script click here!
The script will install the helm chart to the Kubernetes cluster which is currently in kubectl context. To view the context name of the cluster the exporter will be installed on, run:
kubectl config current-context
Setting up your Blueprints
Creating Blueprints using the installation script
The installation script provides a convenient way to create your blueprints. Using the
CUSTOM_BP_PATH environment variable, you can fetch a pre-defined
blueprints.json to create your blueprints. For this use-case, you will use this file to define your blueprints. Do this by running:
blueprints.json file defines the following blueprints:
- Workload *;
- Istio Gateway;
- Istio VirtualService.
Workloadis an abstraction of Kubernetes objects which create and manage pods. By creating this blueprint, you can avoid creating a dedicated blueprint per Workload type, all of which will likely look pretty similar. Here is the list of kubernetes objects
Exporting your Kubernetes cluster
Installing the Kubernetes exporter using the script
CONFIG_YAML_URL parameter, you can define a custom
config.yaml to use when installing the exporter.
In this use-case you will be using the this configuration file. To achieve this, run:
You can now run the installation script using the following code snippet:
curl -s https://raw.githubusercontent.com/port-labs/template-assets/main/kubernetes/install.sh | bash
You can now browse to your Port environment to see that your blueprints have been created, and your k8s and Istio resources are being reported to Port using the freshly installed k8s exporter.