To deploy Skedler on Kubernetes, follow the steps given below:

Deploy ConfigMap

Create a skedler-configmap.yaml file with the following content:

apiVersion: v1
kind: ConfigMap
metadata:
  name: skedler-config
  labels:
    app: skedler
data:
  reporting.yml: |
    ---
    ######################################### SKEDLER REPORTS CONFIGURATION SETTINGS #########################################
    ################################################## ENVIRONMENT SETTINGS ##################################################
    # The environment where skedler is getting deployed. If you don't have an internet connection on your machine, change this as 'true' and enable `skedlerUsername` & `skedlerPassword` as well.
    # isOfflineEnvironment: false
    # Skedler default username and password. Enable this only if you sets `isOfflineEnvironment` as true. You can change username & password for your convenient to create skedler account.
    # skedlerUsername: 'admin@skedler.com'
    # skedlerPassword: 'admin'
    ##################################################### HOST SETTINGS ######################################################
    # The port which skedler runs
    serverPort: 3005
    # The port which skedler need to run redis
    redisPort: 6379
    # The host to bind the skedler
    # host: ""
    # To enable SSL certificate Verification, change this as 'false'
    # skipSslVerification: true
    # The path, which you can use for the proxy purpose with skedler, Specially for Ngnix etc. For example: '/skedler'
    # proxyBasePath: '/skedler'
    ##################################################### LOG SETTINGS ######################################################
    # The path where you need to keep the skedler log files, For example: '/var/opt/skedler-xg'. Leave empty for the default path
    # logFilesDir: ''
    ################################################### DATABASE SETTINGS ###################################################
    # The path where you need to keep the database, For example: '/var/lib/skedler-xg'. Leave empty for the default path
    # databasePath: ''
    # Database where skedler is going to store the data, default is 'sqlite'. you can change as 'mysql', If you're using 'mysql' enable the below properties
    # datastore: 'sqlite'
    # Enable and configure only if you are choosing datastore as `mysql`
    # databaseHost: 'localhost'
    # databasePort: 3306
    # accountDatabaseName: 'sks_accounts'
    # tenantDatabaseName: 'sks_tenant'
    # databaseUsername: 'admin'
    # databasePassword: 'password'
    # dialect: 'mysql'
    # Maximum number of connection in pool, default: 5
    # maxConn: 5
    # Minimum number of connection in pool, default: 0
    # minConn: 0
    # The maximum time, in milliseconds, that a connection can be idle before being released, default: 10000
    # connIdleTime: 10000
    # The maximum time, in milliseconds, that pool will try to get connection before throwing error, default: 10000
    # connAcquireTime: 10000

    ################################################### LICENSE SETTINGS ####################################################
    # Specially for Docker/VM to persist the license which has been activated previously
    # licenseEmail: ''
    # licenseKey: ''
    ################################################## MIGRATION SETTINGS ###################################################
    # Specify the datastore you want to migrate from Skedler 4.x For example: sqlite, mysql, elasticsearch
    # migrationSourceDatastore: 'sqlite'
    # The path of the datastore you want to migrate from Skedler 4.x
    # migrationSourceDatastorePath: '/var/lib/skedler/skedler.db'
    # Base path of Skedler 4.x
    # oldSkedlerBasePath: '/var/lib/skedler'
    # Enable and configure only if you are using datastore as `mysql` in Skedler 4.x
    # migrationDatabaseHost: 'localhost'
    # migrationDatabasePort: 3306
    # migrationDatabaseName: skedler
    # migrationDatabaseUsername: 'admin'
    # migrationDatabasePassword: 'password'
    # migrationDialect: 'mysql'
    # Enable and configure only if you are using datastore as `elasticsearch` in Skedler 4.x
    # The Elasticsearch instance to use for all your queries.
    # elasticsearchUrl: "http://localhost:9200"
    # skedlerIndex: ".skedler"
    # If Elasticsearch uses security or basic auth like xpack, searcguard, opendistro etc, mention below.
    # elasticsearchAuthType: "xpack"
    # If Elasticsearch uses security or basic auth, add the security username and password here for Skedler.
    # skedlerElasticsearchUsername: user
    # skedlerElasticsearchPassword: pass

To deploy the configmap, execute the following command:

kubectl create -f skedler-configmap.yaml

Deploy Skedler

Create a skedler-deployment.yaml file as follows:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: skedler
  labels:
    app: skedler
spec:
  replicas: 1
  selector:
    matchLabels:
      app: skedler
  template:
    metadata:
      labels:
        app: skedler
    spec:
      containers:
      - name: skedler
        image: skedler/reports:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 3005
        volumeMounts:
        - name: skedler-storage
          mountPath: /var/lib/skedler-xg
        - name: skedler-config
          mountPath: /var/opt/skedler-xg/reporting.yml
          subPath: reporting.yml
      volumes:
      - name: skedler-storage
      - name: skedler-config
        configMap:
          name: skedler-config
---
apiVersion: v1
kind: Service
metadata:
  name: skedler
  labels:
    app: skedler
spec:
  selector:
    app: skedler
  ports:
  - port: 3005
    protocol: TCP
  type: LoadBalancer

To deploy, execute the following command:

kubectl create -f skedler-deployment.yaml

Skedler will be deployed in 3005 port.  

To view your deployment, execute the following command:

kubectl get deployments

You can get the service details by executing the following command: 

kubectl get services 

Access Skedler Reports

The default URL for accessing Skedler Reports v5 is:

http://localhost:3005/ 

If you had made configuration changes in the reporting.yml, then the Skedler URL is of the following format:

http://<hostname or your domainurl>:3005 

or 

http://<hostname or your domain url>:<port number>


Login to Skedler Reports

By default, you will see the Create an account UI.  Enter your email to create an administrator account in Skedler Reports. Click on Continue.  


Note: If you have configured an email address and password in reporting.yml, then you can skip the create account step and proceed to Login.  



An account will be created and you will be redirected to the Login page.  


Sign in using the following credentials:


Username: <your email address>   (or the email address you configured in reporting.yml)
Password: admin   (or the password you configured in reporting.yml)


Click Sign in.  



You will see the Reports Dashboard after logging in to the skedler account.   


Next step: Proceed to License Activation