Kubernetes
vFunction Server can be installed on a Kubernetes cluster and on OpenShift using specialized installers.
This page describes some basic operations to work with such an installation.
Viewing the vFunction server configuration on K8S
If the vFunction server was installed correctly you should see the various URLs, credentials, etc. in the cofig file.
Here is the command:
cat ~/vfunction-server-for-kubernetes/config/vfunctionserver_cr.yaml
Getting the available namespace
kubectl get namespace
Getting the pods with their status
To list the pods with the status do:
kubectl get pods -n <namespace>
for example
kubectl get pods -n vfunction
Viewing a pod’s log files
kubectl logs <podname> -n <namespace>
Example:
kubectl logs vfunction-vfapi-measurements-d397b65e-59c68b7f9f-v7w55 -n vfunction
Opening bash inside a pod
kubectl exec -it <podname> -n <namespace> bash
kubectl exec -it vfunction-mysql-d397b65e-974996cfb-zpshd -n kube03 bash
Checking storage for measurement
- Find the storage pod
Example:
kubectl get pods -n new25
- Open bash in the storage pod
Example:
kubectl exec -it vfunction-storage-b84aea5c-55f5fcf877-98d5z -n new25 bash
- Use df -h to check
cd home/storage/storage df -h .
Delete/Restart a pod
If a pod seems hanged try to delete it (another pod with start to replace it):
kubectl delete pod <podname> -n <namespace>
KUBECONFIG
If the server cannot be accessed (say kubectl version
returns an error that the connection is refused)
Dependening on the environment itself, set the KUBECONFIG environment variable.
For example:
export KUBECONFIG=~/.oci/kubeconfig
Getting Kibernetes Client and Server versions
kubectl version