Kibana is a data visualization tool used for log analysis and application monitoring use cases. It is a main component of the Elastic Stack. The installation of Elasticsearch on a Kubernetes cluster was explained in the previous blog post. In this blog, let's learn how to install Kibana on Kubernetes.
Pre-requites:
- Azure Kubernetes Cluster
- Full administrative access to the Kubernetes Cluster
- Workstation with kubectl installed
- Elastic Cloud on Kubernetes is installed
Open a shell or use the Azure Kubernetes Service 'Run Command' to run the script below and create a Kibana instance.
cat <<EOF | kubectl apply -f -
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: quickstart
spec:
version: 8.16.1
count: 1
elasticsearchRef:
name: quickstart
EOF
Run the following command to check the pod status.
kubectl get pod --selector='kibana.k8s.elastic.co/name=quickstart'
Run kubectl get kibana to get details about the Kibana instance, as shown in the image below.
Once the pod status is 'Running', the Kibana instance is created and ready to use. To access Kibana, we need to find the password. Run the command below to get the Password.
kubectl get secret quickstart-es-elastic-user -o=jsonpath='{.data.elastic}' | base64 --decode; echo
Now we know the Kibana password. Run below command to find the IP.
kubectl get service quickstart-kb-http
You can get the cluster IP and port details, as shown in the image below.
Now we have the cluster IP and password, we need to set up port forwarding before accessing Kibana from the local workspace. Use the command below to do this.
kubectl port-forward service/quickstart-kb-http 5601
We are now ready to access Kibana. Log in to the Kibana dashboard at https://localhost:5601 using elastic as the username and the password retrieved in the previous steps.
No comments:
Post a Comment