QuickStart Guide
Installation and Deployments
Kubernetes Installation
9min
you can use kubernetes to install litmus edge before you begin get access to a configured kubernetes cluster get access to persistentvolumeclaim (pvc) learn more about persistent volumes from the kubernetes documentation get administrative permissions to run the kubectl command line tool contact your litmus account representative to get access to the service account json file depending on the specific requirements of your environment, you may need to get access to a storage class learn more about storage classes from the kubernetes documentation to use kubernetes to install litmus edge, you will need to do the following step 1 launch a litmus edge kubernetes step 2 log in to litmus edge step 1 launch a litmus edge kubernetes to launch a litmus edge using kubernetes 1\ download the service account json file, which you can get from your litmus account representative 2\ open a command prompt terminal (ctrl+r) 3\ execute the following commands to setup credentials for a kubernetes namespace bash kubectl create namespace le prodkubectl create namespace le prod the command creates a namespace named le prod bash kubectl create secret namespace le prod docker registry litmus credential docker server=us docker pkg dev docker username= json key docker password='$(cat /\<file name> json)'#change sa file from string to base64 $encodedpassword = \[convert] tobase64string(\[text encoding] utf8 getbytes((get content raw \\\<file name> json))) \# step to add secret kubectl create secret docker registry litmus credential namespace le prod docker server=us docker pkg dev docker username= json key docker password="$encodedpassword" important if you encounter an error as shown in the screenshot below when using windows powershell, make sure to follow these steps the namespace has been created there are no spaces in the command replace the double quotes with single quotes refer to the command parameters kubectl create secret sets a secret for use with a docker registry namespace le prod sets up a kubernetes namespace of le prod docker registry litmus credential sets up secret name as litmus credential this should not be changed docker server=us docker pkg dev sets the docker registry server as us docker pkg dev this should not be changed docker username= json key sets the docker registry username to connect to the server above this should not be changed docker password="$(cat /\<file name> json)" retrieves the password within the service account file requested from step 1 docker password="$encodedpassword" retrieves the password within the service account file requested from step 1 (powershell) note le prod should be changed to an isolated namespace to suit deployment best 4\ copy or download the following litmus edge deployment file https //archbee doc uploads s3 amazonaws com/ssuuxkzuk9bftepnn 6zo/nesqx5re9czkv 9prw kb litmusedge deployment yaml \# create serviceaccount apiversion v1 kind serviceaccount metadata name litmusedge docker namespace le prod labels app kubernetes io/name litmusedge docker app kubernetes io/instance litmusedge instance \ \# create pvc kind persistentvolumeclaim apiversion v1 metadata name litmusedge data namespace le prod labels app kubernetes io/name litmusedge docker app kubernetes io/instance litmusedge instance spec accessmodes \ "readwriteonce" resources requests storage "10g" \ \# create service apiversion v1 kind service metadata name litmusedge docker namespace le prod labels app kubernetes io/name litmusedge docker app kubernetes io/instance litmusedge instance spec type clusterip ports \ port 443 targetport https protocol tcp name https selector app kubernetes io/name litmusedge docker app kubernetes io/instance litmusedge instance \ \# create deployment apiversion apps/v1 kind deployment metadata name litmusedge docker namespace le prod labels app kubernetes io/name litmusedge docker app kubernetes io/instance litmusedge instance spec replicas 1 selector matchlabels app kubernetes io/name litmusedge docker app kubernetes io/instance litmusedge instance template metadata labels app kubernetes io/name litmusedge docker app kubernetes io/instance litmusedge instance spec serviceaccountname litmusedge docker securitycontext {} imagepullsecrets \ name litmus credential containers \ name litmusedge docker securitycontext capabilities add \ net admin image "us docker pkg dev/litmus sales enablement/litmusedge/litmusedge std docker\ latest" imagepullpolicy ifnotpresent ports \ name https containerport 443 protocol tcp volumemounts \ mountpath /var mountpropagation name litmusedge data subpath subpathexpr resources requests cpu 1 memory 1024mi limits cpu 4 memory 4096mi volumes \ name litmusedge data persistentvolumeclaim claimname litmusedge data 5\ execute the following command to deploy a litmus edge kubernetes cluster using the deployment file from step 4 bash kubectl apply f litmusedge deployment yaml namespace le prodkubectl apply f litmusedge deployment yaml namespace le prod refer to the command parameters f litmusedge deployment yaml uses the file litmusedge deployment yaml for deployment this should not be changed namespace le prod sets le prod to be the deployment that kubernetes will use special and additional considerations litmus edge can function in both single and multi kubernetes node clusters, and can support various networking modes your kubernetes admin has the responsibility to configure proper networking adjust cpu/ram/storage for the kubernetes cluster as needed storage should be set to at least 10gb scale additional computing resources when using litmus edge features that require high computing power, such as plc drivers, integrations, and flows consult kubernetes official documentation https //kubernetes io/docs/home/ for best practices ensure credentials are stored properly with kubernetes management net admin permissions are required step 2 log in to litmus edge see access the litmus edge web ui docid\ y hkza2pmc4iruk ebouk for details on logging in see access the terminal user interface docid\ gsdvwb7qwhdhuqf7fkahc for instructions on how to navigate and log in for the first time note to identify the port configured by the admin, use the following command kubectl get svc n le prod