Set kubernetes-dashboard as the default UI addon
Dashboard release info: https://github.com/kubernetes/dashboard/releases/tag/v0.1.0 This replaces kube-ui addonpull/6/head
|
@ -0,0 +1,6 @@
|
|||
# Maintainers
|
||||
|
||||
Piotr Bryk <bryk@google.com> and committers to the https://github.com/kubernetes/dashboard repository.
|
||||
|
||||
|
||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/addons/dashboard/MAINTAINERS.md?pixel)]()
|
|
@ -0,0 +1,11 @@
|
|||
# Kubernetes Dashboard
|
||||
==============
|
||||
|
||||
Kubernetes Dashboard is a general purpose, web-based UI for Kubernetes clusters.
|
||||
It allows users to manage applications running in the cluster, troubleshoot them,
|
||||
as well as manage the cluster itself.
|
||||
|
||||
Learn more at: https://github.com/kubernetes/dashboard
|
||||
|
||||
|
||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/addons/dashboard/README.md?pixel)]()
|
|
@ -0,0 +1,39 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
# Keep the name in sync with image version and
|
||||
# gce/coreos/kube-manifests/addons/dashboard counterparts
|
||||
name: kubernetes-dashboard-v0.1.0
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kubernetes-dashboard
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: kubernetes-dashboard
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kubernetes-dashboard
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- name: kubernetes-dashboard
|
||||
image: gcr.io/google_containers/kubernetes-dashboard-amd64:v0.1.0
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 9090
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 30
|
|
@ -1,15 +1,14 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kube-ui
|
||||
name: kubernetes-dashboard
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-ui
|
||||
k8s-app: kubernetes-dashboard
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "KubeUI"
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kube-ui
|
||||
k8s-app: kubernetes-dashboard
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
targetPort: 9090
|
|
@ -1,27 +1,24 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: kube-ui-v5
|
||||
name: kubernetes-dashboard-v0.1.0
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-ui
|
||||
version: v5
|
||||
k8s-app: kubernetes-dashboard
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: kube-ui
|
||||
version: v5
|
||||
k8s-app: kubernetes-dashboard
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kube-ui
|
||||
version: v5
|
||||
k8s-app: kubernetes-dashboard
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- name: kube-ui
|
||||
image: gcr.io/google_containers/kube-ui:v5
|
||||
- name: kubernetes-dashboard
|
||||
image: gcr.io/google_containers/kubernetes-dashboard-amd64:v0.1.0
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
|
@ -31,10 +28,10 @@ spec:
|
|||
cpu: 100m
|
||||
memory: 50Mi
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
- containerPort: 9090
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
port: 9090
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 5
|
||||
timeoutSeconds: 30
|
|
@ -1,15 +1,14 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kube-ui
|
||||
name: kubernetes-dashboard
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-ui
|
||||
k8s-app: kubernetes-dashboard
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "KubeUI"
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kube-ui
|
||||
k8s-app: kubernetes-dashboard
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
targetPort: 9090
|
|
@ -1,36 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: kube-ui-v3
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-ui
|
||||
version: v3
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: kube-ui
|
||||
version: v3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kube-ui
|
||||
version: v3
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- name: kube-ui
|
||||
image: gcr.io/google_containers/kube-ui:v3
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 5
|
|
@ -25,5 +25,5 @@ KUBE_ROOT=$(cd "$(dirname "${BASH_SOURCE}")/../../.." && pwd)
|
|||
source "${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/${KUBE_CONFIG_FILE-"config-default.sh"}"
|
||||
kubectl="${KUBE_ROOT}/cluster/kubectl.sh"
|
||||
|
||||
"${kubectl}" create -f "${KUBE_ROOT}/cluster/addons/kube-ui/kube-ui-rc.yaml"
|
||||
"${kubectl}" create -f "${KUBE_ROOT}/cluster/addons/kube-ui/kube-ui-svc.yaml"
|
||||
"${kubectl}" create -f "${KUBE_ROOT}/cluster/addons/dashboard/dashboard-controller.yaml"
|
||||
"${kubectl}" create -f "${KUBE_ROOT}/cluster/addons/dashboard/dashboard-service.yaml"
|
||||
|
|
|
@ -289,7 +289,7 @@ function kube-up {
|
|||
|
||||
# Wait for addons to deploy
|
||||
cluster::mesos::docker::await_ready "kube-dns" "${MESOS_DOCKER_ADDON_TIMEOUT}"
|
||||
cluster::mesos::docker::await_ready "kube-ui" "${MESOS_DOCKER_ADDON_TIMEOUT}"
|
||||
cluster::mesos::docker::await_ready "kubernetes-dashboard" "${MESOS_DOCKER_ADDON_TIMEOUT}"
|
||||
|
||||
trap - EXIT
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ function validate-cluster {
|
|||
|
||||
# Validate immediate cluster reachability and responsiveness
|
||||
echo "KubeDNS: $(cluster::mesos::docker::addon_status 'kube-dns')"
|
||||
echo "KubeUI: $(cluster::mesos::docker::addon_status 'kube-ui')"
|
||||
echo "Kubernetes Dashboard: $(cluster::mesos::docker::addon_status 'kubernetes-dashboard')"
|
||||
}
|
||||
|
||||
# Delete a kubernetes cluster
|
||||
|
|
|
@ -146,9 +146,9 @@ addon-dir-create:
|
|||
{% endif %}
|
||||
|
||||
{% if pillar.get('enable_cluster_ui', '').lower() == 'true' %}
|
||||
/etc/kubernetes/addons/kube-ui:
|
||||
/etc/kubernetes/addons/dashboard:
|
||||
file.recurse:
|
||||
- source: salt://kube-addons/kube-ui
|
||||
- source: salt://kube-addons/dashboard
|
||||
- include_pat: E@^.+\.yaml$
|
||||
- user: root
|
||||
- group: root
|
||||
|
|
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 30 KiB |
|
@ -32,56 +32,75 @@ Documentation for other releases can be found at
|
|||
|
||||
<!-- END MUNGE: UNVERSIONED_WARNING -->
|
||||
|
||||
# Kubernetes User Interface
|
||||
# Kubernetes Dashboard User Interface
|
||||
|
||||
Kubernetes has a web-based user interface that displays the current cluster state graphically.
|
||||
Kubernetes has a web-based user interface that allows users to manage applications running in
|
||||
the cluster, troubleshoot them, as well as manage the cluster itself.
|
||||
|
||||
## Accessing the UI
|
||||
## Accessing the Dashboard
|
||||
|
||||
By default, the Kubernetes UI is deployed as a cluster addon. To access it, visit `https://<kubernetes-master>/ui`, which redirects to `https://<kubernetes-master>/api/v1/proxy/namespaces/kube-system/services/kube-ui/#/dashboard/`.
|
||||
By default, the Kubernetes Dashboard is deployed as a cluster addon. To access it, visit
|
||||
`https://<kubernetes-master>/ui`, which redirects to
|
||||
`https://<kubernetes-master>/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard`.
|
||||
|
||||
If you find that you're not able to access the UI, it may be because the kube-ui service has not been started on your cluster. In that case, you can start it manually with:
|
||||
If you find that you're not able to access the Dashboard, it may be because the kubernetes-dashboard
|
||||
service has not been started on your cluster. In that case, you can start it manually with:
|
||||
|
||||
```sh
|
||||
kubectl create -f cluster/addons/kube-ui/kube-ui-rc.yaml --namespace=kube-system
|
||||
kubectl create -f cluster/addons/kube-ui/kube-ui-svc.yaml --namespace=kube-system
|
||||
kubectl create -f cluster/addons/dashboard/dashboard-controller.yaml --namespace=kube-system
|
||||
kubectl create -f cluster/addons/dashboard/dashboard-service.yaml --namespace=kube-system
|
||||
```
|
||||
|
||||
Normally, this should be taken care of automatically by the [`kube-addons.sh`](http://releases.k8s.io/HEAD/cluster/saltbase/salt/kube-addons/kube-addons.sh) script that runs on the master.
|
||||
Normally, this should be taken care of automatically by the
|
||||
[`kube-addons.sh`](http://releases.k8s.io/HEAD/cluster/saltbase/salt/kube-addons/kube-addons.sh)
|
||||
script that runs on the master. Release notes and development versions of the Dashboard can be
|
||||
found at https://github.com/kubernetes/dashboard/releases.
|
||||
|
||||
## Using the UI
|
||||
## Overview
|
||||
|
||||
The Kubernetes UI can be used to introspect your current cluster, such as checking how resources are used, or looking at error messages. You cannot, however, use the UI to modify your cluster.
|
||||
The Dashboard can be used to introspect a cluster, such as show applications running on the
|
||||
cluster, or surface problems in in the state of services. You can also use the UI to modify
|
||||
your cluster. For example, you can deploy applications or change their number of replicas.
|
||||
|
||||
### Node Resource Usage
|
||||
### Using the Dashboard
|
||||
|
||||
After accessing Kubernetes UI, you'll see a homepage dynamically listing out all nodes in your current cluster, with related information including internal IP addresses, CPU usage, memory usage, and file systems usage.
|
||||
![Kubernetes UI home page](k8s-ui-overview.png)
|
||||
When the accessed Dashboard works on an empty cluster, it shows welcome page with links to user
|
||||
guide and documentation. It also allows to deploy to the cluster your first application.
|
||||
![Kubernetes Dashboard welcome page](ui-dashboard-zerostate.png)
|
||||
|
||||
### Dashboard Views
|
||||
### Deploying applications
|
||||
|
||||
Click on the "Views" button in the top-right of the page to see other views available, which include: Explore, Pods, Nodes, Replication Controllers, Services, and Events.
|
||||
With Dashboard you can deploy a replicated application using a simple form that guides through all
|
||||
required steps. All that is needed is a container image URI
|
||||
(e.g., on Google Container Registry or Docker Hub) and knowledge on what ports the image exposes.
|
||||
A replicated application that is deployed through the form is a replication controller plus optional
|
||||
service (if port mappings are specified).
|
||||
|
||||
#### Explore View
|
||||
![Kubernetes Dashboard deploy form](ui-dashboard-deploy-simple.png)
|
||||
|
||||
The "Explore" view allows your to see the pods, replication controllers, and services in current cluster easily.
|
||||
![Kubernetes UI Explore View](k8s-ui-explore.png)
|
||||
The "Group by" dropdown list allows you to group these resources by a number of factors, such as type, name, host, etc.
|
||||
![Kubernetes UI Explore View - Group by](k8s-ui-explore-groupby.png)
|
||||
You can also create filters by clicking on the down triangle of any listed resource instances and choose which filters you want to add.
|
||||
![Kubernetes UI Explore View - Filter](k8s-ui-explore-filter.png)
|
||||
To see more details of each resource instance, simply click on it.
|
||||
![Kubernetes UI - Pod](k8s-ui-explore-poddetail.png)
|
||||
The application deploy form has more options view where advanced configuration settings for the
|
||||
deployed application can be changed, e.g., namespace or image pull secret.
|
||||
|
||||
### Other Views
|
||||
![Kubernetes Dashboard deploy form advanced options](ui-dashboard-deploy-more.png)
|
||||
|
||||
Other views (Pods, Nodes, Replication Controllers, Services, and Events) simply list information about each type of resource. You can also click on any instance for more details.
|
||||
![Kubernetes UI - Nodes](k8s-ui-nodes.png)
|
||||
#### Applications view
|
||||
|
||||
Main Dashboard view shows all applications that are running in the cluster. Applications are
|
||||
denoted by cards that represent a replication controller plus zero or more services. Cards show
|
||||
overview information of applications and allow for simple modifications (e.g., edit replica count)
|
||||
and logs viewing. If error state is detected for a card, it is surfaced to the user.
|
||||
|
||||
![Kubernetes Dashboard applications view](ui-dashboard-rcs.png)
|
||||
|
||||
The application details page lists all replicas together with basic information about them.
|
||||
The events page displays events that are related to replicas of the application.
|
||||
|
||||
![Kubernetes Dashboard application detail](ui-dashboard-rcs-detail.png)
|
||||
|
||||
## More Information
|
||||
|
||||
For more information, see the [Kubernetes UI development document](http://releases.k8s.io/HEAD/www/README.md) in the www directory.
|
||||
|
||||
For more information, see the
|
||||
[Kubernetes Dashboard repository](https://github.com/kubernetes/dashboard).
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/ui.md?pixel)]()
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
assetfs "github.com/elazarl/go-bindata-assetfs"
|
||||
)
|
||||
|
||||
const dashboardPath = "/api/v1/proxy/namespaces/kube-system/services/kube-ui/#/dashboard/"
|
||||
const dashboardPath = "/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard"
|
||||
|
||||
type MuxInterface interface {
|
||||
Handle(pattern string, handler http.Handler)
|
||||
|
|
|
@ -28,28 +28,28 @@ import (
|
|||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("kube-ui", func() {
|
||||
var _ = Describe("Kubernetes Dashboard", func() {
|
||||
const (
|
||||
uiServiceName = "kube-ui"
|
||||
uiServiceName = "kubernetes-dashboard"
|
||||
uiAppName = uiServiceName
|
||||
uiNamespace = api.NamespaceSystem
|
||||
|
||||
serverStartTimeout = 1 * time.Minute
|
||||
)
|
||||
|
||||
f := NewFramework("kube-ui")
|
||||
f := NewFramework(uiServiceName)
|
||||
|
||||
It("should check that the kube-ui instance is alive", func() {
|
||||
By("Checking the kube-ui service exists.")
|
||||
It("should check that the kubernetes-dashboard instance is alive", func() {
|
||||
By("Checking whether the kubernetes-dashboard service exists.")
|
||||
err := waitForService(f.Client, uiNamespace, uiServiceName, true, poll, serviceStartTimeout)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
By("Checking to make sure the kube-ui pods are running")
|
||||
By("Checking to make sure the kubernetes-dashboard pods are running")
|
||||
selector := labels.SelectorFromSet(labels.Set(map[string]string{"k8s-app": uiAppName}))
|
||||
err = waitForPodsWithLabelRunning(f.Client, uiNamespace, selector)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
By("Checking to make sure we get a response from the kube-ui.")
|
||||
By("Checking to make sure we get a response from the kubernetes-dashboard.")
|
||||
err = wait.Poll(poll, serverStartTimeout, func() (bool, error) {
|
||||
var status int
|
||||
// Query against the proxy URL for the kube-ui service.
|
||||
|
@ -63,7 +63,7 @@ var _ = Describe("kube-ui", func() {
|
|||
StatusCode(&status).
|
||||
Error()
|
||||
if status != http.StatusOK {
|
||||
Logf("Unexpected status from kube-ui: %v", status)
|
||||
Logf("Unexpected status from kubernetes-dashboard: %v", status)
|
||||
} else if err != nil {
|
||||
Logf("Request to kube-ui failed: %v", err)
|
||||
}
|