GithubHelp home page GithubHelp logo

blastillroid / cachet-kubernetes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cscotti/k8s-status-page-cachet

0.0 1.0 0.0 14 KB

A Kubernetes version of Cachet. https://cachethq.io/

License: MIT License

cachet-kubernetes's Introduction

cachet-kubernetes

A Kubernetes version of Cachet. https://cachethq.io/

Introduction

Following the documentation below, I've migrated cachet-docker Docker Compose project to Kubernetes. https://www.digitalocean.com/community/tutorials/how-to-migrate-a-docker-compose-workflow-to-kubernetes

Prerequisites

  • A Kubernetes cluster
  • kubectl command-line tool to connect to cluster
  • Docker and docker-compose
  • A Docker Hub account
  • kompose

Usage

Step 1: Edit parameter

postgres-volume0-persistentvolume.yaml

storage: 1Gi
storageClassName: local-storage
path: /var/tmp
k8s-kubenode1

postgres-claim0-persistentvolumeclaim.yaml

storageClassName: local-storage
storage: 1Gi

secret.yaml

APP_KEY: xxxxxxxxxxxxxxxxxxxxxxxx

Note: I've used the default values on the cachet-docker project.

echo -n 'postgres' | base64
cG9zdGdyZXM=

echo -n 'pgsql' | base64
cGdzcWw=

cachet-deployment.yaml

image: vahittabak/cachet-kubernetes

Step 2: Create a storage class

I've used local volume plugin of Kubernetes, https://kubernetes.io/docs/concepts/storage/storage-classes/#local

$ kubectl -f storage-class.yaml
$ kubectl get storageclass

Step 3: Create persistent volume and claim for DB

Create the objects;

$ kubectl -f postgres-volume0-persistentvolume.yaml
$ kubectl -f postgres-claim0-persistentvolumeclaim.yaml

$ kubectl get persistentvolume
$ kubectl get persistentvolumeclaim

Step 4: Start the application

$ kubectl create -f cachet-deployment.yaml,cachet-service.yaml,postgres-deployment.yaml,postgres-service.yaml,secret.yaml

$ kubectl get pods
NAME                      READY   STATUS    RESTARTS   AGE
cachet-5c8649744-qw7ds    1/1     Running   0          2d3h
postgres-89fdc8fc-zhqfm   1/1     Running   0          2d3h

$ kubectl get svc
NAME         TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
cachet       LoadBalancer   10.108.29.172    <pending>     80:31080/TCP   2d3h
kubernetes   ClusterIP      10.96.0.1        <none>        443/TCP        3d
postgres     ClusterIP      10.108.151.113   <none>        5432/TCP       2d3h

Done. Navigate to it in your browser.

Troubleshooting

If you see the below problem;

RuntimeException The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

**Workaround; **

$ kubectl get pods
NAME                      READY   STATUS    RESTARTS   AGE
cachet-5c8649744-qw7ds    1/1     Running   0          2d23h
postgres-89fdc8fc-zhqfm   1/1     Running   0          2d23h

$ kubectl exec -it cachet-5c8649744-qw7ds -- /bin/bash
bash-4.4$
bash-4.4$ php artisan key:generate
Application key set successfully.
bash-4.4$ php artisan config:clear
Configuration cache cleared!

Done. Navigate to it in your browser again.

cachet-kubernetes's People

Contributors

vhtbk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.