Miscellaneous terminal commands
8 May 2023 · Read time 1 min
Check the OS version
To to terminal software installations, you will need to know what operating system is being used so you can choose the correct binaries.
In the Google CLI console, Check the OS Version
cat /etc/os-release
# Response from Google console
-----------
# PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
# NAME="Debian GNU/Linux"
# VERSION_ID="11"
# VERSION="11 (bullseye)"
# VERSION_CODENAME=bullseye
# ID=debian
# HOME_URL="https://www.debian.org/"
# SUPPORT_URL="https://www.debian.org/support"
# BUG_REPORT_URL="https://bugs.debian.org/"
# Response from Ubuntu SSH Terminal
-----------
# PRETTY_NAME="Ubuntu 22.04.2 LTS"
# NAME="Ubuntu"
# VERSION_ID="22.04"
# VERSION="22.04.2 LTS (Jammy Jellyfish)"
# VERSION_CODENAME=jammy
# ID=ubuntu
# ID_LIKE=debian
# HOME_URL="https://www.ubuntu.com/"
# SUPPORT_URL="https://help.ubuntu.com/"
# BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
# PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
# UBUNTU_CODENAME=jammy
altinitycloud-connect kubernetes
Displays Kubernetes roles and resources that the kubect apply will use run the following command and save the output from your terminal as a text file to read.
altinitycloud-connect kubernetes
# Response example
---------------
# apiVersion: v1
# kind: Namespace
# metadata:
# name: altinity-cloud-system
# ---
# apiVersion: v1
# kind: Namespace
# metadata:
# name: altinity-cloud-managed-clickhouse
# ---
# apiVersion: rbac.authorization.k8s.io/v1
# kind: ClusterRole
#
# ... several more lines
#
# name: cloud-connect
# volumeMounts:
# - mountPath: /etc/cloud-connect
# name: secret
# serviceAccountName: cloud-connect
# volumes:
# - name: secret
# secret:
# secretName: cloud-connect
Watch - Real-Time Monitoring
Use a watch command when you want to monitor node activity of the altinity-cloud namespaces in real time. This is useful for installations that are taking a long time, and you wish to watch the provisioning process.
Run the watch commands on the two altinity-cloud prefixed namespaces using the following commands:
watch -n altinity-cloud-system get all
watch -n altinity-cloud-managed-clickhouse get all
watch kubectl -n altinity-cloud-system get all
# Example response
# ---------------------------
Every 2.0s: kubectl -n altinity-cloud-system get all john.doe-MacBook-Pro.local: Sun Mar 19 23:03:18 2023
NAME READY STATUS RESTARTS AGE
pod/cloud-connect-d6ff8499f-bkc5k 1/1 Running 0 10h
pod/crtd-665fd5cb85-wqkkk 1/1 Running 0 10h
pod/edge-proxy-66d44f7465-t9446 2/2 Running 0 10h
pod/grafana-5b466574d-vvt9p 1/1 Running 0 10h
pod/kube-state-metrics-58d86c747c-7hj79 1/1 Running 0 10h
pod/node-exporter-762b5 1/1 Running 0 10h
pod/prometheus-0 1/1 Running 0 10h
pod/statuscheck-f7c9b4d98-2jlt6 1/1 Running 0 10h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/edge-proxy ClusterIP 10.109.2.17 <none> 443/TCP,8443/TCP,9440/TCP 10h
service/edge-proxy-lb LoadBalancer 10.100.216.192 <pending> 443:31873/TCP,8443:32612/TCP,9440:31596/TCP 10h
service/grafana ClusterIP 10.108.24.91 <none> 3000/TCP 10h
service/prometheus ClusterIP 10.102.103.141 <none> 9090/TCP 10h
service/prometheus-headless ClusterIP None <none> 9090/TCP 10h
service/statuscheck ClusterIP 10.101.224.247 <none> 80/TCP 10h
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/node-exporter 1 1 1 1 1 <none> 10h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/cloud-connect 1/1 1 1 10h
deployment.apps/crtd 1/1 1 1 10h
deployment.apps/edge-proxy 1/1 1 1 10h
deployment.apps/grafana 1/1 1 1 10h
deployment.apps/kube-state-metrics 1/1 1 1 10h
deployment.apps/statuscheck 1/1 1 1 10h
NAME DESIRED CURRENT READY AGE
replicaset.apps/cloud-connect-d6ff8499f 1 1 1 10h
replicaset.apps/crtd-665fd5cb85 1 1 1 10h
replicaset.apps/edge-proxy-66d44f7465 1 1 1 10h
replicaset.apps/grafana-5b466574d 1 1 1 10h
replicaset.apps/grafana-6478f89b7c 0 0 0 10h
replicaset.apps/kube-state-metrics-58d86c747c 1 1 1 10h
replicaset.apps/statuscheck-f7c9b4d98 1 1 1 10h
NAME READY AGE
statefulset.apps/prometheus 1/1 10h
Figure 1 - The watch monitoring window for the namespaces altinity-cloud-system listing each node name, IP address, and the run status.
watch kubectl -n altinity-cloud-managed-clickhouse get all
# Example response
# ---------------------------
Every 2.0s: kubectl -n altinity-cloud-managed-clickhouse get all john.doe-MacBook-Pro.local: Mon Mar 20 00:14:44 2023
NAME READY STATUS RESTARTS AGE
pod/chi-test-anywhere-6-test-anywhere-6-0-0-0 2/2 Running 0 11h
pod/clickhouse-operator-996785fc-rgfvl 2/2 Running 0 11h
pod/zookeeper-5244-0 1/1 Running 0 11h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/chi-test-anywhere-6-test-anywhere-6-0-0 ClusterIP 10.98.202.85 <none> 8123/TCP,9000/TCP,9009/TCP 11h
service/clickhouse-operator-metrics ClusterIP 10.109.90.202 <none> 8888/TCP 11h
service/clickhouse-test-anywhere-6 ClusterIP 10.100.48.57 <none> 8443/TCP,9440/TCP 11h
service/zookeeper-5244 ClusterIP 10.101.71.82 <none> 2181/TCP,7000/TCP 11h
service/zookeepers-5244 ClusterIP None <none> 2888/TCP,3888/TCP 11h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/clickhouse-operator 1/1 1 1 11h
NAME DESIRED CURRENT READY AGE
replicaset.apps/clickhouse-operator-996785fc 1 1 1 11h
NAME READY AGE
statefulset.apps/chi-test-anywhere-6-test-anywhere-6-0-0 1/1 11h
statefulset.apps/zookeeper-5244 1/1 11h
Figure 2 - The watch monitoring window for the namespace altinity-cloud-managed-clickhouse, listing each node name, IP address, and the run status.
K9S Real-Time Monitoring
K9s is similar to the watch command for monitoring nodes in real time, but displayed in color and in a smaller interactive window, K9S is a free utility that lets you monitor in real time the progress of a provisioning installation.
To open monitoring windows for each altinity-cloud namespaces, open a new terminal instance and run the k9s command:
k9s -n altinity-cloud-system
k9s -n altinity-cloud-managed-clickhouse
Feedback
Was this page helpful?
Glad to hear it!
Sorry to hear that. We'll track this issue and see how we can improve.