K3s Installation Steps

JFrog Installation & Setup Documentation

ft:sourceType
Paligo
  1. Download the installer script from releases.jfrog.io.

  2. Run the installer script.

    ./jfrog-platform-<version>.k3s.sh

    The installer performs the following actions in sequence.

    1. Installs K3s server.

    2. Start K3s server.

    3. Installs Helm.

    4. Fetches the JFrog Platform binaries from the Helm repository.

    5. Initializes the pods with JFrog products.

      The installer exits and displays the further commands that you need to run to complete the installation. You can save these commands for future use.

      In the following example, xx.xx.xxx.xxx is the IP address of the machine.

      1. Get the Artifactory URL by running these commands:
         NOTE: It may take a few minutes for the LoadBalancer IP to be available.
               You can watch the status of the service by running 'kubectl get svc --namespace jfrog-platform -w jfrog-platform-artifactory-nginx'
         export SERVICE_IP=$(kubectl get svc --namespace jfrog-platform jfrog-platform-artifactory-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
         echo http://$SERVICE_IP/
       
      2. Open Artifactory in your browser
         Default credential for Artifactory:
         user: admin
         password: password
       
      Using the bundled PostgreSQL database:
      To extract the database password, run the following
      export DB_PASSWORD=$(kubectl get --namespace jfrog-platform $(kubectl get secret --namespace jfrog-platform -o name | grep postgresql) -o jsonpath="{.data.postgresql-password}" | base64 --decode)
      echo ${DB_PASSWORD}
       
      Open Artifactory URL in your browser. Enabled services should be activated with Artifactory.
       
      Your JFrog Platform is being deployed.
      Since all the product images are being downloaded, this process may take around 15 minutes depending on your connection speed.
       
      Execute the following steps to access Jfrog Platform UI,
      1. Run the following command to check the status of the platform,
       
              export KUBECONFIG=/etc/rancher/k3s/k3s.yaml; kubectl get pods -n jfrog-platform
       
      2. Once all pods are in the running state, run the following command to expose the port to the JFrog Platform UI,
       
              nohup kubectl port-forward "jfrog-platform-artifactory-nginx-9cc54d4d7-28mfx" --address=localhost,"xx.xx.xxx.xxx" 80:80 -n jfrog-platform >/dev/null 2>&1 &
       
          You must run this command again to expose the ports if you restart the server.
       
      3. Access the JFrog Platform UI through the browser at: http://xx.xx.xxx.xxx
  3. Run the following commands to check whether all pods are in the running state.

    export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
    kubectl get pods -n jfrog-platform

    Warning

    The initial setup of the pods can take upwards of 15 minutes. Wait until all the pods are in the running state before you proceed.

  4. Run the following command to expose the ports so that you can access the JFrog Platform UI.

    nohup kubectl port-forward $(kubectl get pod -l app=artifactory,component=nginx -o jsonpath="{.items[0].metadata.name}" -n jfrog-platform) --address=localhost,"$(hostname -i 2>/dev/null | awk '{print $1}')" 80:80 -n jfrog-platform >/dev/null 2>&1 &

    Note

    You must run this command when you restart the machine to access the JFrog Platform.

  5. Access Artifactory from your browser at: http://SERVER_HOSTNAME . For example, on your local machine: http://localhost .

  6. To access the logs, find the name of the pod using the following command.

    kubectl --namespace jfrog-platform get pods
  7. To get the specific container logs, run the following command.

    kubectl --namespace jfrog-platform logs -f <name of the pod> -c <name of the container>

After the installation is complete, see Onboarding Wizard for information on how to get started with using the JFrog Platform.