Exposing the Kubernetes Dashboard with Istio Service Mesh
Written by Sigal Zigelboim   
Thursday, 24 November 2022
Article Index
Exposing the Kubernetes Dashboard with Istio Service Mesh
Save and Edit the Definition File

Step 2: Save and Edit the Definition File

Download the Kubernetes-dashboard.yaml definition file using the wget command:  

wget  https://raw.githubusercontent.com/kubernetes/
                                -O kubernetes-dashboard.yaml

Here is how to implement the Namespace specification. It requires us to define the API version, its kind, spec and metadata as follows: 

apiVersion: v1
kind: Namespace       
  name: kubernetes-dashboard
  —port: 90
     targetPort: 8443
    k8s-app: kubernetes-dashboard

Let’s implement the dashboard secret. In order to avoid certificate errors that can occur in several web browsers, we will develop it manually. We define API version, its kind, type and metadata as follows: 

apiVersion: v1
kind: Secret
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard-certs
  namespace: kube-system
type: Opaque

Step 3: Create Namespaces and Certificates

This stage involves the generation of Namespaces and Certificates.

  1. All other dashboard elements for the K8 will come under the Namespace category. In this step, we will first create the kubernetes-dashboard namespace using kubectl:


  1. Next, we will create the Certificates using kubectl:



Step 4: Deployment of the Configuration 

In this step, we will deploy the Kubernetes-deployment.yaml file using the create command: 


A Kubernetes Namespace defines the scope of the cluster's Pods, Services, and Deployments. We can analyze the Pods and Services using the get commands: 



Step 5: Implement the Kubernetes Dashboard 

Here we build ClusterRoleBinding and a ServiceAccount. Create a ServiceAccount using dashboard-admin.yaml:

apiVersion: v1
kind: ServiceAccount
    k8s-app: kubernetes-dashboard
  name: dashboard-admin
  namespace: kubernetes-dashboard
  —port: 80

Now create ClusterRoleBinding using



To implement a Kubernetes Dashboard, users need to apply the ClusterRoleBinding and a ServiceAccount using the apply command in their cluster: 

kubectl apply -f dashboard-admin.yaml
kubectl apply -f dashboard-admin-bind-cluster-role.yaml 

Users can access the dashboard by opening the host url, which we defined in the VirtualService. In our case, navigate to k8sdashboard.example.com

Create a connection between the default cluster administrator and the cluster administrator by establishing a ServiceAccount using the create command as follows:


Lastly, users can log in to the Kubernetes dashboard using the newly acquired token.


In this article, I explained the basics of Istio for Kubernetes clusters, and showed how you can use Istio to easily expose your Kubernetes dashboard to users and administrators of your cluster. This involves: 

  1. Creating a new dashboard Gateway and Virtual Service.

  2. Saving and editing the definition file.

  3. Generating Namespaces and Certificates.

  4. Deploying the Kubernetes-deployment.yaml file using the create command.

  5. Creating a ClusterRoleBinding and ServiceAccount. 

I hope this will be useful as you make better use of Istio for managing cluster communications. 


More Information


Related Articles

Istio 1.7 Expands Capabilities for the Hybrid Cloud

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.



Pulumi Adds Infrastructure Lifecycle Management Features

Pulumi has added new infrastructure lifecycle management features to Pulumi Deployments, its deployments and workflow product.

Google Gemini API Developer Competition

Google is running a Gemini API Developer Competition with prizes including a 1981 custom electric DeLorean. Entrants will use the Gemini API to tackle real-world challenges, and the organizers su [ ... ]

More News

raspberry pi books



or email your comment to: comments@i-programmer.info

Last Updated ( Friday, 25 November 2022 )