Configure the dashboard service for a Kubernetes Cluster

Source: Internet
Author: User

Configure the dashboard service for a Kubernetes Cluster

This article describes how to create and use kube-ui (also called dashboard) based on the previous article. This is essentially an api interface for connecting webui to the master. It obtains information about the k8s cluster through the api and then displays it on the web, which is more friendly to users, it is not very useful.

1. Download image files and integrate them into the local warehouse for unified management

# Docker pull docker. io/mritd/kubernetes-dashboard-amd64
# Docker tag docker. io/mritd/kubernetes-dashboard-amd64 \
Registry.fjhb.cn/kubernetes-dashboard-amd64
# Docker push registry.fjhb.cn/kubernetes-dashboard-amd64

2. Create Deployment and service based on the rc file

# Cat kube-ui-rc.yaml
# Copyright 2015 Google Inc. All Rights Reserved,grafana smtp configuration kubernetes.
#
# Licensed under the Apache License, Version 2.0 (the "License ");kubernetes pod configuration file
# You may not use this file before t in compliance with the License.
# You may obtain a copy of the License
#
# Http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# Distributed under the License is distributed on an "as is" BASIS,configure docker registry in kubernetes
# Without warranties or conditions of any kind, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.

# Configuration to deploy release version of the Dashboard UI.
#
# Example usage: kubectl create-f <this_file>

Kind: Deployment
ApiVersion: extensions/v1beta1
Metadata:
Labels:
App: kubernetes-dashboard
Version: latest
Name: kubernetes-dashboard
Namespace: default
Spec:
Replicas: 1
Selector:
MatchLabels:
App: kubernetes-dashboard
Template:
Metadata:
Labels:
App: kubernetes-dashboard
# Comment the following annotation if Dashboard must not be deployed on master
Annotations:
Schedations. alpha. kubernetes. io/tolerations: |
[
{
"Key": "dedicated ",
"Operator": "Equal ",
"Value": "master ",
"Effect": "NoSchedule"
}
]
Spec:
Containers:
-Name: kubernetes-dashboard
Image: registry.fjhb.cn/kubernetes-dashboard-amd64
ImagePullPolicy: Always
Ports:
-Maid: 9090
Protocol: TCP
Args:
# Uncomment the following line to manually specify Kubernetes API server Host
# If not specified, kubernetes application configuration Dashboard will attempt to auto discover the API server and connect
# To it. Uncomment only if the default does not work.
--- Apiserver-host = 192.168.115.5: 8080
LivenessProbe:
HttpGet:
Path :/
Port: 9090
InitialDelaySeconds: 30
TimeoutSeconds: 30
---
Kind: Service
ApiVersion: v1
Metadata:
Labels:
App: kubernetes-dashboard
Name: kubernetes-dashboard
Namespace: default
Spec:
Type: NodePort
Ports:
-Port: 80
TargetPort: 9090
Selector:
App: kubernetes-dashboard # kubectl create-f kube-ui-rc.yaml configure kubernetes
# Kubectl get svc
# Kubectl get pod


Iii. web Access Testing
You can access the web-ui interface by using the ip address and port of two node nodes, which is essentially implemented using iptables nat rules.




On the panel, you can view
Node, deployments, replica sets, replication controllers, pod, jobs, services, ingress, storage, secret, and other information are essentially queried by connecting to apiserver and displayed on the web-ui.

This article permanently updates link: pod configuration kubernetes https://www.bkjia.com/Linux/2018-03/151279.htm


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.