Jump to: navigation, search

Difference between revisions of "StarlingX/Docs and Infra/InstallationGuides/COMMON/Access-StarlingX-Kubernetes"

(Local CLIs)
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
 +
<span style="color: red;"><big>'''DEPRECATED - Please do not edit.'''</big></span>
 +
 
= Accessing StarlingX Kubernetes =
 
= Accessing StarlingX Kubernetes =
 
== Local CLIs ==
 
== Local CLIs ==

Latest revision as of 23:49, 20 August 2019


DEPRECATED - Please do not edit.

Accessing StarlingX Kubernetes

Local CLIs

Login to controller-0 via console or SSH with sysadmin/<sysadmin-password> .

Acquire Keystone Admin and Kubernetes Admin credentials:

source /etc/platform/openrc


StarlingX system and host management commands are via the 'system' command, e.g.:
( 'system help' for full list of options )

[sysadmin@controller-0 ~(keystone_admin)]$ system host-list
+----+--------------+-------------+----------------+-------------+--------------+
| id | hostname     | personality | administrative | operational | availability |
+----+--------------+-------------+----------------+-------------+--------------+
| 1  | controller-0 | controller  | unlocked       | enabled     | available    |
+----+--------------+-------------+----------------+-------------+--------------+
[sysadmin@controller-0 ~(keystone_admin)]$ 


StarlingX fault management commands are via the 'fm' command: e.g.:
( 'fm help' for full list of options )

[sysadmin@controller-0 ~(keystone_admin)]$ fm alarm-list
+----------+---------------------------+---------------------+----------+---------------+
| Alarm ID | Reason Text               | Entity ID           | Severity | Time Stamp    |
+----------+---------------------------+---------------------+----------+---------------+
| 750.002  | Application Apply Failure | k8s_application=    | major    | 2019-08-08T20 |
|          |                           | platform-integ-apps |          | :17:58.223926 |
|          |                           |                     |          |               |
+----------+---------------------------+---------------------+----------+---------------+
[sysadmin@controller-0 ~(keystone_admin)]$ 


Kubernetes commands are via the 'kubectl' command, e.g.:
( see https://kubernetes.io/docs/reference/kubectl/overview/ for details )

[sysadmin@controller-0 ~(keystone_admin)]$ kubectl get nodes
NAME           STATUS   ROLES    AGE     VERSION
controller-0   Ready    master   5d19h   v1.13.5
[sysadmin@controller-0 ~(keystone_admin)]$ kubectl get pods
NAME                                              READY   STATUS    RESTARTS   AGE
dashboard-kubernetes-dashboard-7749d97f95-bzp5w   1/1     Running   0          3d18h
[sysadmin@controller-0 ~(keystone_admin)]$ 



Remote CLIs

TBD


GUI

StarlingX Horizon

Access the StarlingX Horizon GUI in your browser at address:

http://<oam-floating-ip-address>:8080

Use admin / <sysadmin-password> to login to Horizon as admin.

Kubernetes Dashboard

The Kubernetes Dashboard is not installed by default.

To install the Kubernetes Dashboard, create use the kubernetes-dashboard helm chart from the stable helm repository with the override values shown below:

cat <<EOF > dashboard-values.yaml 
service:
  type: NodePort
  nodePort: 30000

rbac:
  create: true
  clusterAdminRole: true

serviceAccount:
  create: true
  name: kubernetes-dashboard
EOF

helm install stable/kubernetes-dashboard --name dashboard -f dashboard-values.yaml


Create an 'admin-user' service account with 'cluster-admin' priviledges, and
display its token for logging into Kubernetes Dashboard.

cat <<EOF > admin-login.yaml 
apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: admin-user
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: admin-user
  namespace: kube-system
EOF

kubectl apply -f admin-login.yaml

kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')


Access the Kubernetes Dashboard GUI in your browser at address:

https://<oam-floating-ip-address>:30000

Login with the 'admin-user's TOKEN.


REST APIs

The StarlingX Platform related public REST API Endpoints can be listed by:

openstack endpoint list | grep public

Use these URLs as the prefix for the URL target of StarlingX Platform Services' REST API messages.