diff --git a/cluster/addons/dashboard/MAINTAINERS.md b/cluster/addons/dashboard/MAINTAINERS.md new file mode 100644 index 00000000000..3cd983031ba --- /dev/null +++ b/cluster/addons/dashboard/MAINTAINERS.md @@ -0,0 +1,6 @@ +# Maintainers + +Piotr Bryk 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)]() diff --git a/cluster/addons/dashboard/README.md b/cluster/addons/dashboard/README.md new file mode 100644 index 00000000000..9a798ec39ff --- /dev/null +++ b/cluster/addons/dashboard/README.md @@ -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)]() diff --git a/cluster/addons/dashboard/dashboard-controller.yaml b/cluster/addons/dashboard/dashboard-controller.yaml new file mode 100644 index 00000000000..b05c4c39b4a --- /dev/null +++ b/cluster/addons/dashboard/dashboard-controller.yaml @@ -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 diff --git a/cluster/addons/kube-ui/kube-ui-svc.yaml b/cluster/addons/dashboard/dashboard-service.yaml similarity index 56% rename from cluster/addons/kube-ui/kube-ui-svc.yaml rename to cluster/addons/dashboard/dashboard-service.yaml index cf960c8bda3..195b503de10 100644 --- a/cluster/addons/kube-ui/kube-ui-svc.yaml +++ b/cluster/addons/dashboard/dashboard-service.yaml @@ -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 diff --git a/cluster/addons/kube-ui/kube-ui-rc.yaml b/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml similarity index 64% rename from cluster/addons/kube-ui/kube-ui-rc.yaml rename to cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml index 5b714ce6164..41b02123a7e 100644 --- a/cluster/addons/kube-ui/kube-ui-rc.yaml +++ b/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml @@ -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 diff --git a/cluster/gce/coreos/kube-manifests/addons/kube-ui/kube-ui-svc.yaml b/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-service.yaml similarity index 56% rename from cluster/gce/coreos/kube-manifests/addons/kube-ui/kube-ui-svc.yaml rename to cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-service.yaml index cf960c8bda3..195b503de10 100644 --- a/cluster/gce/coreos/kube-manifests/addons/kube-ui/kube-ui-svc.yaml +++ b/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-service.yaml @@ -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 diff --git a/cluster/gce/coreos/kube-manifests/addons/kube-ui/kube-ui-rc.yaml b/cluster/gce/coreos/kube-manifests/addons/kube-ui/kube-ui-rc.yaml deleted file mode 100644 index 4bfdf381e87..00000000000 --- a/cluster/gce/coreos/kube-manifests/addons/kube-ui/kube-ui-rc.yaml +++ /dev/null @@ -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 diff --git a/cluster/mesos/docker/deploy-ui.sh b/cluster/mesos/docker/deploy-ui.sh index b117a49b7d0..bdbb9285675 100755 --- a/cluster/mesos/docker/deploy-ui.sh +++ b/cluster/mesos/docker/deploy-ui.sh @@ -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" diff --git a/cluster/mesos/docker/util.sh b/cluster/mesos/docker/util.sh index 0e6ec563c49..83b3b3085e2 100644 --- a/cluster/mesos/docker/util.sh +++ b/cluster/mesos/docker/util.sh @@ -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 diff --git a/cluster/saltbase/salt/kube-addons/init.sls b/cluster/saltbase/salt/kube-addons/init.sls index 98e3d174476..3989edd838c 100644 --- a/cluster/saltbase/salt/kube-addons/init.sls +++ b/cluster/saltbase/salt/kube-addons/init.sls @@ -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 diff --git a/docs/user-guide/k8s-ui-explore-filter.png b/docs/user-guide/k8s-ui-explore-filter.png deleted file mode 100644 index a9a53d0edf2..00000000000 Binary files a/docs/user-guide/k8s-ui-explore-filter.png and /dev/null differ diff --git a/docs/user-guide/k8s-ui-explore-groupby.png b/docs/user-guide/k8s-ui-explore-groupby.png deleted file mode 100644 index 4f313af850d..00000000000 Binary files a/docs/user-guide/k8s-ui-explore-groupby.png and /dev/null differ diff --git a/docs/user-guide/k8s-ui-explore-poddetail.png b/docs/user-guide/k8s-ui-explore-poddetail.png deleted file mode 100644 index ddcf6918c70..00000000000 Binary files a/docs/user-guide/k8s-ui-explore-poddetail.png and /dev/null differ diff --git a/docs/user-guide/k8s-ui-explore.png b/docs/user-guide/k8s-ui-explore.png deleted file mode 100644 index cd6b8b7bf5d..00000000000 Binary files a/docs/user-guide/k8s-ui-explore.png and /dev/null differ diff --git a/docs/user-guide/k8s-ui-nodes.png b/docs/user-guide/k8s-ui-nodes.png deleted file mode 100644 index 123b0267a2c..00000000000 Binary files a/docs/user-guide/k8s-ui-nodes.png and /dev/null differ diff --git a/docs/user-guide/k8s-ui-overview.png b/docs/user-guide/k8s-ui-overview.png deleted file mode 100644 index ca98b28255c..00000000000 Binary files a/docs/user-guide/k8s-ui-overview.png and /dev/null differ diff --git a/docs/user-guide/ui-dashboard-deploy-more.png b/docs/user-guide/ui-dashboard-deploy-more.png new file mode 100644 index 00000000000..b76ee9c4ae2 Binary files /dev/null and b/docs/user-guide/ui-dashboard-deploy-more.png differ diff --git a/docs/user-guide/ui-dashboard-deploy-simple.png b/docs/user-guide/ui-dashboard-deploy-simple.png new file mode 100644 index 00000000000..55e2642d9a5 Binary files /dev/null and b/docs/user-guide/ui-dashboard-deploy-simple.png differ diff --git a/docs/user-guide/ui-dashboard-rcs-detail.png b/docs/user-guide/ui-dashboard-rcs-detail.png new file mode 100644 index 00000000000..80974213e80 Binary files /dev/null and b/docs/user-guide/ui-dashboard-rcs-detail.png differ diff --git a/docs/user-guide/ui-dashboard-rcs.png b/docs/user-guide/ui-dashboard-rcs.png new file mode 100644 index 00000000000..5825cfbb470 Binary files /dev/null and b/docs/user-guide/ui-dashboard-rcs.png differ diff --git a/docs/user-guide/ui-dashboard-zerostate.png b/docs/user-guide/ui-dashboard-zerostate.png new file mode 100644 index 00000000000..348bfeefcb4 Binary files /dev/null and b/docs/user-guide/ui-dashboard-zerostate.png differ diff --git a/docs/user-guide/ui.md b/docs/user-guide/ui.md index b99a4ef25bd..d1e66c8f01b 100644 --- a/docs/user-guide/ui.md +++ b/docs/user-guide/ui.md @@ -32,56 +32,75 @@ Documentation for other releases can be found at -# 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:///ui`, which redirects to `https:///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:///ui`, which redirects to +`https:///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). [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/ui.md?pixel)]() diff --git a/pkg/ui/installsupport.go b/pkg/ui/installsupport.go index d1c02dcb58c..15d1bb30a6f 100644 --- a/pkg/ui/installsupport.go +++ b/pkg/ui/installsupport.go @@ -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) diff --git a/test/e2e/kube-ui.go b/test/e2e/dashboard.go similarity index 81% rename from test/e2e/kube-ui.go rename to test/e2e/dashboard.go index 2cdda33b3d2..1faf97afc24 100644 --- a/test/e2e/kube-ui.go +++ b/test/e2e/dashboard.go @@ -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) }