CLI reference¶
qliksense preflight¶
Preflight checks provide pre-installation cluster conformance testing and validation before we install qliksense on the cluster. We gather a suite of conformance tests that can be easily written and run on the target cluster to verify that cluster-specific requirements are met.
We support a couple of tests at the moment as part of preflight checks, and the range of the suite will be expanded in future.
Run the following command to view help about the commands supported by preflight at any moment:
qliksense preflight
Running all checks¶
Run the following command to execute all preflight checks
qliksense preflight all --mongodb-url=<mongo-server url> --mongodb-ca-cert=<path to ca-cert file>
Running specific check¶
Run the following command to execute a specific check
qliksense preflight dns
Running cleanup¶
Run the following command to cleanup entities created for preflight checks that were left behind on the cluster.
qliksense preflight clean
qliksense postflight¶
Postflight checks are performed after qliksense is installed on the cluster and during normal operating mode of the product. Such checks can range from validating certain conditions to checking the status of certain operations or entities.
Run the following command to view help about the commands supported by postflight at any moment:
qliksense postflight
qliksense load¶
qliksense load
command takes input from a file or from pipe
qliksense load -f cr-file.yaml
cat cr-file.yaml | qliksense load -f -
This will load the Custom Resource (CR) into ${QLIKSENSE_HOME}
folder, create context structure and set the current context to that CR.
This will also encrypt the secrets from CR while writing the CR into the disk.
qliksense apply¶
qliksense apply
command takes input from a file or from pipe
qliksense apply -f cr-file.yaml
cat cr-file.yaml | qliksense apply -f -
The content of cr-file.yaml
should be something like the following:
apiVersion: qlik.com/v1
kind: Qliksense
metadata:
name: qlik-test
labels:
version: v0.0.2
spec:
configs:
qliksense:
- name: acceptEULA
value: "yes"
secrets:
qliksense:
- name: mongodbUri
value: mongodb://qlik-test-mongodb:27017/qliksense?ssl=false
profile: docker-desktop
qliksense apply
does everything qliksense load
does but will install Qlik Sense into the cluster as well
qliksense about¶
qliksense about
command will display information about qliksense-k8s release.
For example, running the following command will show information about default profile for 1.0.0
tag
qliksense about 1.0.0
Run the following command to view options for about
command:
qliksense about --help
Using other supported commands user might have built the CR into the location ~/.qliksense/myqliksense.yaml
apiVersion: qlik.com/v1
kind: QlikSense
metadata:
name: myqliksense
spec:
profile: docker-desktop
manifestsRoot: /Usr/xyz/my-k8-repo/manifests
namespace: myqliksense
storageClassName: efs
configs:
qliksense:
- name: acceptEULA
value: "yes"
secrets:
qliksense:
- name: mongodbUri
value: "mongo://mongo:3307"
- name: messagingPassword
valueFromKey: messagingPassword
In this case, the result of qliksense about
command would display information from:
/Usr/xyz/my-k8-repo/manifests/docker-desktop
location, or- Pull and show information from
master
branch if the directory is invalid or empty
qliksense config¶
qliksense config
will perform operations on configurations and contexts regarding the qliksense-k8 release.
It supports the following flags:
qliksense config list-contexts
- get and list contextsqliksense config set
- configure a key-value pair into the current contextqliksense config set-configs
- set configurations into qliksense context as key-value pairsqliksense config set-context
- sets the Kubernetes context where resources are locatedqliksense config set-secrets <service_name>.<attribute>="<value>" --secret=false
- set secrets configurations into qliksense context as key-value pairs and show encrypted value as part of CRqliksense config set-secrets <service_name>.<attribute>="<value>" --secret=true
- set secrets configurations into qliksense context as key-value pairs and show a key reference to the created Kubernetes secret resource as part of the CRqliksense config view
- view the qliksense operator CRqliksense config delete-context
- deletes a specific context locally (not in-cluster). Deletes context in spec ofconfig.yaml
and locally deletes entire folder of specified context (does not delete secrets from cluster)
The global file which abstracts all contexts is ~/.qliksense/config.yaml
apiVersion: config.qlik.com/v1
kind: QliksenseConfig
metadata:
name: QliksenseConfigMetadata
spec:
contexts:
- name: qlik-default
crFile: /Users/xyz/.qliksense/contexts/qlik-default/qlik-default.yaml
- name: myqliksense
crFile: /Users/xyz/.qliksense/contexts/myqliksense/myqliksense.yaml
- name: hello
crFile: /Users/xyz/.qliksense/contexts/hello/hello.yaml
currentContext: hello