Code Monkey home page Code Monkey logo

flux-get-started's Introduction

flux-get-started


Step-by-step run-through on how to use Flux and Helm Operator over here.

More advanced Helm setup, take a look at the fluxcd/helm-operator-get-started repository.


$ ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -q -N ""

$ cat ~/.ssh/id_rsa.pub

// FluxCtl Installation
$ curl -sL https://fluxcd.io/install | sh && chmod +x $HOME/.fluxcd/bin/fluxctl && sudo mv $HOME/.fluxcd/bin/fluxctl /usr/local/bin/

$ export PATH=$PATH:$HOME/.fluxcd/bin

With HELM3

$ helm repo add fluxcd https://charts.fluxcd.io

$ kubectl create namespace fluxcd

$ kubectl apply -f https://raw.githubusercontent.com/fluxcd/helm-operator/master/deploy/crds.yaml

$ helm upgrade -i flux fluxcd/flux --wait \
--namespace fluxcd \
--set [email protected]:webmak1/flux-get-started \
--set git.timeout=3m \
--set git.pollInterval=1m \
--set resources.requests.cpu=500m \
--set resources.requests.memory=500Mi \
--set sync.timeout=3m \
--set helm.versions=v3

$ helm upgrade -i helm-operator fluxcd/helm-operator --wait \
--namespace fluxcd \
--set git.ssh.secretName=flux-git-deploy \
--set helm.versions=v3

$ fluxctl --k8s-fwd-ns fluxcd identity 

GITHUB --> Project (flux-get-started) --> SETTINGS --> DELPLOY KEYS

+ allow write access

$ fluxctl --k8s-fwd-ns=fluxcd sync

$ kubectl logs -n fluxcd  deployment/flux -f

$ kubectl logs -n fluxcd deploy/helm-operator -f

Cheks

$ watch kubectl -n fluxcd get pods

$ helm list --namespace demo
NAME 	NAMESPACE	REVISION	UPDATED                                STATUS  	CHART      	APP VERSION
ghost	demo     	1       	2021-01-16 17:27:59.501952901 +0000 UTCdeployed	ghost-9.0.4	3.1.1      


$ kubectl get pods -n demo
NAME                       READY   STATUS              RESTARTS   AGE
ghost-55c87c6bd5-g9vs5     0/1     ContainerCreating   0          62s
ghost-mariadb-0            0/1     ContainerCreating   0          61s
podinfo-6fb4c8894d-9gp98   1/1     Running             0          78s
podinfo-6fb4c8894d-j9b8x   1/1     Running             0          62s


$ kubectl get svc -n demo
NAME            TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
ghost           ClusterIP   10.100.79.47     <none>        80/TCP     79s
ghost-mariadb   ClusterIP   10.103.249.225   <none>        3306/TCP   79s
podinfo         ClusterIP   10.105.27.5      <none>        9898/TCP   95s


$ kubectl get deployments -n demo
NAME      READY   UP-TO-DATE   AVAILABLE   AGE
ghost     0/1     1            0           2m5s
podinfo   2/2     2            2           2m21s


$ kubectl describe -n demo deployment/podinfo | grep Image
    Image:      alpine:3.10
    Image:       stefanprodan/podinfo:3.1.5


Test case


https://github.com/webmak1/flux-get-started/edit/master/releases/mongodb.yaml


set


tag: 4.0.14


vait for 5 minutes.


$ kubectl -n fluxcd logs deployment/flux -f

$ kubectl describe -n demo deployment/mongodb | grep Image
    Image:      docker.io/bitnami/mongodb:4.0.14

Solution with error [git push delete context deadline exceeded]

$ fluxctl --k8s-fwd-ns=flux sync
Error: git repository ssh://[email protected]/webmakaka/flux-get-started is not ready to sync

Full error message: running git command: git [push --delete [email protected]:webmakaka/flux-get-started tag flux-write-check-1b50d03dc8]: context deadline exceeded

To solve this issue use

--set git.timeout=3m

Marley

WebMakaka

flux-get-started's People

Contributors

stefanprodan avatar jozala avatar jozala-work avatar wildmakaka avatar rade avatar squaremo 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.