diff --git a/docs/user/access-control/README.md b/docs/user/access-control/README.md index 5ebbbd878f3494ae6a21c5f1da7631a9524a5e81..9b01edb58bc20a5a259269f46cc428bacfcca7ba 100644 --- a/docs/user/access-control/README.md +++ b/docs/user/access-control/README.md @@ -74,7 +74,7 @@ You can grant full admin privileges to Dashboard's Service Account by creating b ### Official release -``` +```yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -92,7 +92,7 @@ subjects: ### Development release -``` +```yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: diff --git a/docs/user/access-control/creating-sample-user.md b/docs/user/access-control/creating-sample-user.md index efddcbfeb593e0d5d6af9bff11b3dd627c55864b..025950baa20fb0a90c194b0089e8ed26d1d14c8d 100644 --- a/docs/user/access-control/creating-sample-user.md +++ b/docs/user/access-control/creating-sample-user.md @@ -10,7 +10,7 @@ For each of the following snippets for `ServiceAccount` and `ClusterRoleBinding` We are creating Service Account with name `admin-user` in namespace `kubernetes-dashboard` first. -``` +```shell cat < 443:31707/TCP 21h ``` diff --git a/docs/user/certificate-management.md b/docs/user/certificate-management.md index 01770b16e408d4648d14c8a60415b43b5821d155..1ccd3954d65db12a6294189fe4d48e9852e2819f 100644 --- a/docs/user/certificate-management.md +++ b/docs/user/certificate-management.md @@ -21,7 +21,7 @@ In case you want to generate certificates on your own you need library like [Ope A private key and certificate signing request are required to create an SSL certificate. These can be generated with a few simple commands. When the openssl req command asks for a “challenge password”, just press return, leaving the password empty. This password is used by Certificate Authorities to authenticate the certificate owner when they want to revoke their certificate. Since this is a self-signed certificate, there’s no way to revoke it via CRL (Certificate Revocation List). -``` +```shell openssl genrsa -des3 -passout pass:over4chars -out dashboard.pass.key 2048 ... openssl rsa -passin pass:over4chars -in dashboard.pass.key -out dashboard.key @@ -39,7 +39,7 @@ A challenge password []: The self-signed SSL certificate is generated from the `dashboard.key` private key and `dashboard.csr` files. -``` +```shell openssl x509 -req -sha256 -days 365 -in dashboard.csr -signkey dashboard.key -out dashboard.crt ``` diff --git a/docs/user/installation.md b/docs/user/installation.md index 95687d25cd7a07a5616159993f324affb4c8db8f..85d3203dd678597662aa4ab78b042439620d8814 100644 --- a/docs/user/installation.md +++ b/docs/user/installation.md @@ -12,18 +12,18 @@ By default self-signed certificates are generated and stored in-memory. In case Custom certificates have to be stored in a secret named `kubernetes-dashboard-certs` in the same namespace as Kubernetes Dashboard. Assuming that you have `tls.crt` and `tls.key` files stored under `$HOME/certs` directory, you should create secret with contents of these files: -``` +```shell kubectl create secret generic kubernetes-dashboard-certs --from-file=$HOME/certs -n kubernetes-dashboard ``` For Dashboard to pickup the certificates, you must pass arguments `--tls-cert-file=/tls.crt` and `--tls-key-file=/tls.key` to the container. You can edit YAML definition and deploy Dashboard in one go: -``` +```shell kubectl create --edit -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.1.0/aio/deploy/recommended.yaml ``` Under Deployment section, add arguments to pod definition, it should look as follows: -``` +```yaml containers: - args: - --tls-cert-file=/tls.crt @@ -37,7 +37,7 @@ This setup is not fully secure. Certificates are not used and Dashboard is expos To deploy Dashboard execute following command: -``` +```shell kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.1/aio/deploy/alternative.yaml ``` @@ -50,8 +50,8 @@ Besides official releases, there are also development releases, that are pushed In most of the use cases you need to execute the following command to deploy latest development release: -``` -$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.1/aio/deploy/head.yaml +```shell +kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.1/aio/deploy/head.yaml ``` ### Update @@ -60,8 +60,13 @@ Once installed, the deployment is not automatically updated. In order to update Delete all Dashboard pods (assuming that Dashboard is deployed in kubernetes-dashboard namespace): -``` +```shell kubectl -n kubernetes-dashboard delete $(kubectl -n kubernetes-dashboard get pod -o name | grep dashboard) +``` + +The output is similar to this: + +``` pod "dashboard-metrics-scraper-fb986f88d-gnfnk" deleted pod "kubernetes-dashboard-7d8b9cc8d-npljm" deleted ```