← Back
Mischa Vandenburg September 18, 2024 54m

Kubernetes Homelab - Full Project: from Python Code to Container on K8s

Read full transcript 36 segments
  1. hello there my name is Misha I'm a hello there my name is Misha I'm a devops engineer from the Netherlands and devops engineer from the Netherlands and devops engineer from the Netherlands and today I wanted to share with you a today I wanted to share with you a today I wanted to share with you a little project that I did little project that I did little project that I did recently I really like to Tinker and recently I really like to Tinker and recently I really like to Tinker and mess around with my home lab in my free mess around with my home lab in my free mess around with my home lab in my free time and yesterday I needed a bit of a time and yesterday I needed a bit of a time and yesterday I needed a bit of a break from the grind so I had a nice day break from the grind so I had a nice day break from the grind so I had a nice day of just relaxing and coding and of just relaxing and coding and of just relaxing and coding and tinkering thing is that I I have this tinkering thing is that I I have this tinkering thing is that I I have this sensor it's a Shelly temperature and sensor it's a Shelly temperature and sensor it's a Shelly temperature and humidity humidity humidity sensor and I have this in my bedroom sensor and I have this in my bedroom sensor and I have this in my bedroom because sleep is a bit of a thing for me because sleep is a bit of a thing for me because sleep is a bit of a thing for me if I don't pay attention I don't sleep if I don't pay attention I don't sleep if I don't pay attention I don't sleep enough and it's hard for me to fall enough and it's hard for me to fall enough and it's hard for me to fall asleep so it's very important that my asleep so it's very important that my asleep so it's very important that my bedroom is on a certain temperature at bedroom is on a certain temperature at bedroom is on a certain temperature at least that's what I'm trying to do I'm least that's what I'm trying to do I'm least that's what I'm trying to do I'm not very successful because as you can not very successful because as you can not very successful because as you can see my my bedroom tends to be over 21° see my my bedroom tends to be over 21° see my my bedroom tends to be over 21° which is suboptimal but at least now I which is suboptimal but at least now I which is suboptimal but at least now I have data that I that confirms that I have data that I that confirms that I have data that I that confirms that I have had this sensor for a long time for have had this sensor for a long time for have had this sensor for a long time for maybe 6 months and I used to read this maybe 6 months and I used to read this maybe 6 months and I used to read this data in home data in home data in home assistant assistant assistant now home assistant isn't really doing it now home assistant isn't really doing it now home assistant isn't really doing it for me for some reason I don't know why for me for some reason I don't know why for me for some reason I don't know why but I I don't maybe it's the interface but I I don't maybe it's the interface but I I don't maybe it's the interface or the fact that it kind of feels like or the fact that it kind of feels like or the fact that it kind of feels like cheating when you just can just click on cheating when you just can just click on cheating when you just can just click on an integration and it's already working an integration and it's already working an integration and it's already working and poof it's there so it's and I and I and poof it's there so it's and I and I and poof it's there so it's and I and I have some problems with when I update have some problems with when I update have some problems with when I update then sometimes I lose some data and then sometimes I lose some data and then sometimes I lose some data and that's of course a skill issue but I

  2. that's of course a skill issue but I that's of course a skill issue but I don't know it's just not doing it for me don't know it's just not doing it for me don't know it's just not doing it for me so what I wanted is to have this data in so what I wanted is to have this data in so what I wanted is to have this data in my own postgress database because in my my own postgress database because in my my own postgress database because in my home lab I actually have several home lab I actually have several home lab I actually have several postgress databases that I manage uh if postgress databases that I manage uh if postgress databases that I manage uh if I open my dashboard here for postgress I open my dashboard here for postgress I open my dashboard here for postgress databases here is my comma feed database databases here is my comma feed database databases here is my comma feed database for example that holds all of my RSS for example that holds all of my RSS for example that holds all of my RSS feeds and and I have my LinkedIn feeds and and I have my LinkedIn feeds and and I have my LinkedIn database that holds my bookmarks database that holds my bookmarks database that holds my bookmarks interface with the LinkedIn application interface with the LinkedIn application interface with the LinkedIn application and what's really nice is that I can and what's really nice is that I can and what's really nice is that I can actually just show this see the status actually just show this see the status actually just show this see the status of my entire database it has been backed of my entire database it has been backed of my entire database it has been backed up to the Azure cloud two hours ago Etc up to the Azure cloud two hours ago Etc up to the Azure cloud two hours ago Etc so it's it's a really nice way of so it's it's a really nice way of so it's it's a really nice way of managing my own data and I really managing my own data and I really managing my own data and I really started to like databases and I'm started to like databases and I'm started to like databases and I'm starting to get a bit of an obsession starting to get a bit of an obsession starting to get a bit of an obsession for them so it's nice to have my data in for them so it's nice to have my data in for them so it's nice to have my data in my own database that's also why I want my own database that's also why I want my own database that's also why I want to have this very important data of to have this very important data of to have this very important data of my my bedroom temperature in my own my my bedroom temperature in my own my my bedroom temperature in my own database database database so the way that shell thing works is so the way that shell thing works is so the way that shell thing works is I'll open excal here so I have my little I'll open excal here so I have my little I'll open excal here so I have my little sensor sensor sensor here in my here in my here in my bedroom and whenever that whenever the bedroom and whenever that whenever the bedroom and whenever that whenever the temperature changes with half a degree

  3. temperature changes with half a degree temperature changes with half a degree it will wake it will wake it will wake up and it can either stay awake and then up and it can either stay awake and then up and it can either stay awake and then you can curl it but that saves that you can curl it but that saves that you can curl it but that saves that drains the battery very quickly I have drains the battery very quickly I have drains the battery very quickly I have it running on a battery so what I do is it running on a battery so what I do is it running on a battery so what I do is it sends the information to an mqtt it sends the information to an mqtt it sends the information to an mqtt container that's running on my Nas container that's running on my Nas container that's running on my Nas so I have so I have so I have mq oh that is very thick thick mq TT that is running on my sonology Nas so TT that is running on my sonology Nas so this is my this is my this is my sonology the sonology is in a separate sonology the sonology is in a separate sonology the sonology is in a separate VLAN so this is in my storage VLAN and VLAN so this is in my storage VLAN and VLAN so this is in my storage VLAN and then I have another VLAN for my then I have another VLAN for my then I have another VLAN for my um for my kubernetes cluster um for my kubernetes cluster um for my kubernetes cluster because of because of because of course this data needs to this course this data needs to this course this data needs to this application that I write to query this application that I write to query this application that I write to query this data needs to run on kubernetes of data needs to run on kubernetes of data needs to run on kubernetes of course so this is my kubernetes cluster course so this is my kubernetes cluster course so this is my kubernetes cluster VLAN VLAN VLAN VLAN and this is another VLAN and this is another VLAN and this is another VLAN and this one holds my kubernetes VLAN and this one holds my kubernetes VLAN and this one holds my kubernetes cluster cluster cluster so I need a way for my for something in so I need a way for my for something in so I need a way for my for something in my kubernetes cluster to read this

  4. my kubernetes cluster to read this my kubernetes cluster to read this mqtt data this this queue on the mqtt data this this queue on the mqtt data this this queue on the container and to put that data into a container and to put that data into a container and to put that data into a postrest postrest postrest database running in my kubernetes database running in my kubernetes database running in my kubernetes cluster and for that I will very likely cluster and for that I will very likely cluster and for that I will very likely I thought I would need to have a I thought I would need to have a I thought I would need to have a container that then speak to the container that then speak to the container that then speak to the database and to The mqtt Container over mqtt Container over there so this is my there so this is my there so this is my database and this is a database and this is a database and this is a container this is the setup that I had container this is the setup that I had container this is the setup that I had in mind and for that of course I thought in mind and for that of course I thought in mind and for that of course I thought about using python because I I I've I've about using python because I I I've I've about using python because I I I've I've been flirting with go for about a year been flirting with go for about a year been flirting with go for about a year and it and it and it I know the fundamentals I can write I know the fundamentals I can write I know the fundamentals I can write simple programs for it I could have simple programs for it I could have simple programs for it I could have written all of this in go but recently I written all of this in go but recently I written all of this in go but recently I have started to fall to turn back to have started to fall to turn back to have started to fall to turn back to python because that is the language that python because that is the language that python because that is the language that I have several years of experience in I have several years of experience in I have several years of experience in and it it is just so easy to get a and it it is just so easy to get a and it it is just so easy to get a project up and running with that it is project up and running with that it is project up and running with that it is just such just such just such a yeah it it's very easy like mentally a yeah it it's very easy like mentally a yeah it it's very easy like mentally to sit down and to just write something to sit down and to just write something to sit down and to just write something out and just get going you can get going out and just get going you can get going out and just get going you can get going very quickly and that is very different very quickly and that is very different very quickly and that is very different with go with go it seems to be a bit with go with go it seems to be a bit with go with go it seems to be a bit more of a and that's of course a skill

  5. more of a and that's of course a skill more of a and that's of course a skill issue but with go it's a bit more of a issue but with go it's a bit more of a issue but with go it's a bit more of a hassle to get going and um I I really hassle to get going and um I I really hassle to get going and um I I really like the fact that I can just sit down like the fact that I can just sit down like the fact that I can just sit down and within five minutes I have something and within five minutes I have something and within five minutes I have something like this running like this running like this running already so this was the main idea that I already so this was the main idea that I already so this was the main idea that I had I wanted it to run on my kubernetes had I wanted it to run on my kubernetes had I wanted it to run on my kubernetes cluster and it needed to um store it in cluster and it needed to um store it in cluster and it needed to um store it in a database now even though I run several a database now even though I run several a database now even though I run several databases and I've have worked a lot databases and I've have worked a lot databases and I've have worked a lot with databases on uh at work I I used to with databases on uh at work I I used to with databases on uh at work I I used to take backups and dump them and restore take backups and dump them and restore take backups and dump them and restore them but I've always been working on the them but I've always been working on the them but I've always been working on the operational side of databases but I operational side of databases but I operational side of databases but I never actually took the time to look never actually took the time to look never actually took the time to look inside and to to know what goes on inside and to to know what goes on inside and to to know what goes on inside of a database so this little inside of a database so this little inside of a database so this little project project project also was an incentive for me to learn also was an incentive for me to learn also was an incentive for me to learn more about what's going on inside of a more about what's going on inside of a more about what's going on inside of a database like how is the data actually database like how is the data actually database like how is the data actually stored because tables columns rows all stored because tables columns rows all stored because tables columns rows all of that was still like I didn't really of that was still like I didn't really of that was still like I didn't really know what those terms meant in terms of know what those terms meant in terms of know what those terms meant in terms of postgress postgress postgress databases so I started thinkering and databases so I started thinkering and databases so I started thinkering and I have my uh repo here oh let me just um I have my uh repo here oh let me just um I have my uh repo here oh let me just um key caster let me just start my key key caster let me just start my key key caster let me just start my key casting casting casting here let's here let's here let's [Music]

  6. see key Caster where are you start see key Caster where are you start casting okay now you see my keys and I casting okay now you see my keys and I casting okay now you see my keys and I will just put the phone size a little will just put the phone size a little will just put the phone size a little bit bigger okay so I will go to bit bigger okay so I will go to bit bigger okay so I will go to my kit repo this holds my my kit repo this holds my my kit repo this holds my my uh the code that I wrote so it's a my uh the code that I wrote so it's a my uh the code that I wrote so it's a very very simple project it now has a very very simple project it now has a very very simple project it now has a Docker file Docker compost. yo and a Docker file Docker compost. yo and a Docker file Docker compost. yo and a main.py and it also has a Dev container main.py and it also has a Dev container main.py and it also has a Dev container that I used to develop that I used to develop that I used to develop in so let's in so let's in so let's see here you see also the the dev see here you see also the the dev see here you see also the the dev container directory directory now the the code itself is rather simple now the the code itself is rather simple now the the code itself is rather simple it's it's it's this is the code I I probably shouldn't this is the code I I probably shouldn't this is the code I I probably shouldn't I probably won't go through the entire I probably won't go through the entire I probably won't go through the entire thing but I set up the longing and it thing but I set up the longing and it thing but I set up the longing and it takes all of the information that it takes all of the information that it takes all of the information that it needs so it needs to know where the mqtt needs so it needs to know where the mqtt needs so it needs to know where the mqtt Q is it needs to know where the which Q is it needs to know where the which Q is it needs to know where the which Port the username password and it needs Port the username password and it needs Port the username password and it needs the database the database the database credentials I take all of those from credentials I take all of those from credentials I take all of those from environment variables then it needs to environment variables then it needs to environment variables then it needs to create a uh postgress connection with create a uh postgress connection with create a uh postgress connection with those variables that you see up there it those variables that you see up there it those variables that you see up there it will then set up the table in the the will then set up the table in the the will then set up the table in the the postgress database so this was this was postgress database so this was this was postgress database so this was this was something new or there was something something new or there was something something new or there was something exciting to learn about like about

  7. exciting to learn about like about exciting to learn about like about different tables in databases and how different tables in databases and how different tables in databases and how how this um how you actually set up a how this um how you actually set up a how this um how you actually set up a database and I wanted to do it from the database and I wanted to do it from the database and I wanted to do it from the program itself so because I was running program itself so because I was running program itself so because I was running it in a Dev container and in Docker it in a Dev container and in Docker it in a Dev container and in Docker compose with fresh databases all the compose with fresh databases all the compose with fresh databases all the time so all the time I wanted to it to time so all the time I wanted to it to time so all the time I wanted to it to set up the table if it didn't set up the table if it didn't set up the table if it didn't exist then um this is the function to exist then um this is the function to exist then um this is the function to insert the data into the database this insert the data into the database this insert the data into the database this was interesting to learn was interesting to learn was interesting to learn about uh I'm using the psychop PG um about uh I'm using the psychop PG um about uh I'm using the psychop PG um here psychop PG so there are several here psychop PG so there are several here psychop PG so there are several psychop pgs there's psychop pg2 and psychop pgs there's psychop pg2 and psychop pgs there's psychop pg2 and psychop psychop psychop pg3 and I realized that psychop pg3 is pg3 and I realized that psychop pg3 is pg3 and I realized that psychop pg3 is actually the same as psychop PG and this actually the same as psychop PG and this actually the same as psychop PG and this seems to be the the most standard seems to be the the most standard seems to be the the most standard library of um inserting things into library of um inserting things into library of um inserting things into postgress databases because thing is I postgress databases because thing is I postgress databases because thing is I always choose postgress databases always always choose postgress databases always always choose postgress databases always and because that's what I have most and because that's what I have most and because that's what I have most experience with but that's also seems to experience with but that's also seems to experience with but that's also seems to be the most common choice for databases be the most common choice for databases be the most common choice for databases and there is this article that I and there is this article that I and there is this article that I recently read called just yeah just use recently read called just yeah just use recently read called just yeah just use postgress by Ethan mchu read this it's a postgress by Ethan mchu read this it's a postgress by Ethan mchu read this it's a very interesting article and it I always very interesting article and it I always very interesting article and it I always did this already I always defaulted to did this already I always defaulted to did this already I always defaulted to postgress but this one really confirmed postgress but this one really confirmed postgress but this one really confirmed my my thoughts around that so we insert

  8. my my thoughts around that so we insert my my thoughts around that so we insert the data using the psychop PG with a Tim the data using the psychop PG with a Tim the data using the psychop PG with a Tim stamp and then here comes the there was stamp and then here comes the there was stamp and then here comes the there was bit a bit tricky with the mqtt bit a bit tricky with the mqtt bit a bit tricky with the mqtt connection because basically it sets up connection because basically it sets up connection because basically it sets up a a loop and then it listens for certain a a loop and then it listens for certain a a loop and then it listens for certain events and when that event happens then events and when that event happens then events and when that event happens then it will run a call back function so the it will run a call back function so the it will run a call back function so the the linter here is giving me some some the linter here is giving me some some the linter here is giving me some some crap because crap because crap because I um I'm not accessing certain data I I um I'm not accessing certain data I I um I'm not accessing certain data I try to figure it out but I I couldn't try to figure it out but I I couldn't try to figure it out but I I couldn't get it to work without without these get it to work without without these get it to work without without these errors in the linting the code works but errors in the linting the code works but errors in the linting the code works but um I think it has to do with the nature um I think it has to do with the nature um I think it has to do with the nature of these call black functions of these call black functions of these call black functions unfortunately so uh we subscribe to unfortunately so uh we subscribe to unfortunately so uh we subscribe to certain topics so the mqtt protocol certain topics so the mqtt protocol certain topics so the mqtt protocol works with topics at least that's works with topics at least that's works with topics at least that's something I also learned in this process something I also learned in this process something I also learned in this process because this is the thing in in home because this is the thing in in home because this is the thing in in home assistant I just had a shell integration assistant I just had a shell integration assistant I just had a shell integration with with with mqtt and you click it and then you don't mqtt and you click it and then you don't mqtt and you click it and then you don't really know what happens you don't really know what happens you don't really know what happens you don't really understand what what's going on really understand what what's going on really understand what what's going on now with this I needed to as I was now with this I needed to as I was now with this I needed to as I was programming this I needed to like get a programming this I needed to like get a programming this I needed to like get a sense of oh which topics are there and sense of oh which topics are there and sense of oh which topics are there and and how do what do the topics look like and how do what do the topics look like and how do what do the topics look like how does the Json data look like and how how does the Json data look like and how how does the Json data look like and how I'm going to pull out the data from I'm going to pull out the data from I'm going to pull out the data from there and this is such a such a nicer there and this is such a such a nicer there and this is such a such a nicer experience of doing things in my opinion experience of doing things in my opinion experience of doing things in my opinion just you you ask for the data you see

  9. just you you ask for the data you see just you you ask for the data you see what comes out and then you pick out what comes out and then you pick out what comes out and then you pick out what you need so this is probably very what you need so this is probably very what you need so this is probably very inefficient but I like to just see in inefficient but I like to just see in inefficient but I like to just see in the code which topics I'm actually the code which topics I'm actually the code which topics I'm actually subscribing in to so uh on in the main subscribing in to so uh on in the main subscribing in to so uh on in the main function here it will create a function here it will create a function here it will create a connection and then on up here there is connection and then on up here there is connection and then on up here there is an onconnect function a call back an onconnect function a call back an onconnect function a call back function so on the event of a connection then then um then on connect is being called um then on connect is being called um then on connect is being called so in the main function I'm starting a so in the main function I'm starting a so in the main function I'm starting a connection and when that on connection connection and when that on connection connection and when that on connection event happens it runs this callback event happens it runs this callback event happens it runs this callback function which subscribes to those function which subscribes to those function which subscribes to those topics now next there is the on message topics now next there is the on message topics now next there is the on message function so down here you will see there function so down here you will see there function so down here you will see there is on message and whenever there is an a is on message and whenever there is an a is on message and whenever there is an a message event then it runs that call message event then it runs that call message event then it runs that call back back back function um so on message it function um so on message it function um so on message it will um create a time stamp it will will um create a time stamp it will will um create a time stamp it will split the topics it will it will like split the topics it will it will like split the topics it will it will like the data comes back in a certain format the data comes back in a certain format the data comes back in a certain format you split it and then you p i I pull out you split it and then you p i I pull out you split it and then you p i I pull out the certain data that I want and the certain data that I want and the certain data that I want and eventually I get the payload and then I eventually I get the payload and then I eventually I get the payload and then I write a log line that says the the what write a log line that says the the what write a log line that says the the what it has what it has received from the

  10. it has what it has received from the it has what it has received from the mqtt and then it runs the insert data mqtt and then it runs the insert data mqtt and then it runs the insert data function to put it into the database so function to put it into the database so function to put it into the database so far so good so this is in this is the far so good so this is in this is the far so good so this is in this is the current state of my code it's publicly current state of my code it's publicly current state of my code it's publicly available on K GitHub so M available on K GitHub so M available on K GitHub so M shy here you can see the the code here shy here you can see the the code here shy here you can see the the code here this is just the the current state of it this is just the the current state of it this is just the the current state of it as I'm recording this video I might as I'm recording this video I might as I'm recording this video I might Tinker more with this I mean it works Tinker more with this I mean it works Tinker more with this I mean it works now so I might just keep it as it is but now so I might just keep it as it is but now so I might just keep it as it is but I like to come back to these things and I like to come back to these things and I like to come back to these things and optimize it a little bit but that's in optimize it a little bit but that's in optimize it a little bit but that's in in a nutshell how the code works and in a nutshell how the code works and in a nutshell how the code works and this took me a few hours to figure out this took me a few hours to figure out this took me a few hours to figure out because I needed to learn about the mqtt because I needed to learn about the mqtt because I needed to learn about the mqtt I needed to learn how this data looks I needed to learn how this data looks I needed to learn how this data looks like I needed to learn about these like I needed to learn about these like I needed to learn about these callback functions using the the the callback functions using the the the callback functions using the the the pahoe um Library so this is the this is pahoe um Library so this is the this is pahoe um Library so this is the this is the nice thing about this you you you the nice thing about this you you you the nice thing about this you you you define a use case you define a project define a use case you define a project define a use case you define a project that you want to do and then you figure that you want to do and then you figure that you want to do and then you figure it out that's what that's the the goal it out that's what that's the the goal it out that's what that's the the goal here to to figure things out here to to figure things out here to to figure things out now uh I have this code and I could run now uh I have this code and I could run now uh I have this code and I could run that locally that locally that locally so to do because I was of course running so to do because I was of course running so to do because I was of course running this with um just on my local machine this with um just on my local machine this with um just on my local machine with the the envir with the credentials with the the envir with the credentials with the the envir with the credentials hardcoded in my file and then of course hardcoded in my file and then of course hardcoded in my file and then of course I needed to start testing it so then I

  11. I needed to start testing it so then I I needed to start testing it so then I created this Docker compost. yaml and created this Docker compost. yaml and created this Docker compost. yaml and this Docker this Docker this Docker compost um. yaml compost um. yaml compost um. yaml first it builds the docker file we will first it builds the docker file we will first it builds the docker file we will look at that one next but this Docker look at that one next but this Docker look at that one next but this Docker compost. yo um builds the actual python compost. yo um builds the actual python compost. yo um builds the actual python application in a Docker image and it application in a Docker image and it application in a Docker image and it sets up a database so this is the the sets up a database so this is the the sets up a database so this is the the image it will use is postr 16 and it image it will use is postr 16 and it image it will use is postr 16 and it takes some environment variables with takes some environment variables with takes some environment variables with for the database name the user for the database name the user for the database name the user Etc and then there is the health check Etc and then there is the health check Etc and then there is the health check and whenever when that health check is and whenever when that health check is and whenever when that health check is completed then because of this depends completed then because of this depends completed then because of this depends on then the other Docker container will on then the other Docker container will on then the other Docker container will come up so there's two Docker containers come up so there's two Docker containers come up so there's two Docker containers there's the database container and there there's the database container and there there's the database container and there is is is the the um actual python the the um actual python the the um actual python application that application looks like application that application looks like application that application looks like this so I like to use the Alpine image this so I like to use the Alpine image this so I like to use the Alpine image which is very very which is very very which is very very basic then we set the work directory we basic then we set the work directory we basic then we set the work directory we copy the required requirements.txt and copy the required requirements.txt and copy the required requirements.txt and then we install all of the dependencies then we install all of the dependencies then we install all of the dependencies from the requirements.txt into the from the requirements.txt into the from the requirements.txt into the Container then we copy the SRC directory Container then we copy the SRC directory Container then we copy the SRC directory which contain only contains that main.py which contain only contains that main.py which contain only contains that main.py file that you just saw and then when the file that you just saw and then when the file that you just saw and then when the container launches we run python main.py container launches we run python main.py container launches we run python main.py very simple very simple very simple now this container runs as root so that

  12. now this container runs as root so that now this container runs as root so that is not secure and this is the next is not secure and this is the next is not secure and this is the next iteration that I'm going to do actually iteration that I'm going to do actually iteration that I'm going to do actually after after finishing this video I'm after after finishing this video I'm after after finishing this video I'm going to make sure that this container going to make sure that this container going to make sure that this container runs as a different user and then I also runs as a different user and then I also runs as a different user and then I also will update my kubernetes manifests so will update my kubernetes manifests so will update my kubernetes manifests so this so far so good I have my Docker this so far so good I have my Docker this so far so good I have my Docker composted gaml I have my Docker file and composted gaml I have my Docker file and composted gaml I have my Docker file and now I can test my now I can test my now I can test my local again locally I can test whether local again locally I can test whether local again locally I can test whether this works by running Docker compose this works by running Docker compose this works by running Docker compose build Docker comp post up build so this build Docker comp post up build so this build Docker comp post up build so this will build the docker file that's in my will build the docker file that's in my will build the docker file that's in my current current current directory and all of the other directory and all of the other directory and all of the other dependencies that I declared so now you dependencies that I declared so now you dependencies that I declared so now you see here the postest database is see here the postest database is see here the postest database is ready and now it has inserted some data ready and now it has inserted some data ready and now it has inserted some data from from the from from the from from the mqtt Q on my mqtt Q on my mqtt Q on my Synology into the database so we see Synology into the database so we see Synology into the database so we see here it it's logging so this this all of here it it's logging so this this all of here it it's logging so this this all of this is logging that we saw in the in this is logging that we saw in the in this is logging that we saw in the in the application and the application and the application and now now I I I wanted to know like okay now now I I I wanted to know like okay now now I I I wanted to know like okay cool I have cool I have cool I have these uh well like in the development these uh well like in the development these uh well like in the development process I also needed to check out process I also needed to check out process I also needed to check out what's going on inside of the database what's going on inside of the database what's going on inside of the database now I knew how to do this with psql so now I knew how to do this with psql so now I knew how to do this with psql so if I run Docker if I run Docker if I run Docker PS uh grab DB then here we see that my

  13. PS uh grab DB then here we see that my PS uh grab DB then here we see that my shell DB container it's the first line shell DB container it's the first line shell DB container it's the first line is already up so if I do Docker exac is already up so if I do Docker exac is already up so if I do Docker exac it um Shelly shell Shelly shell DB1 bash now I'm in my my DB1 bash now I'm in my my DB1 bash now I'm in my my container container container so um then in here I can run psql but it so um then in here I can run psql but it so um then in here I can run psql but it is configured with a different default is configured with a different default is configured with a different default configuration so what I need to do is to configuration so what I need to do is to configuration so what I need to do is to p SQL and then the host is Local Host p SQL and then the host is Local Host p SQL and then the host is Local Host user postgress because that is what is user postgress because that is what is user postgress because that is what is defined in my environment file so now I defined in my environment file so now I defined in my environment file so now I am in my postgress am in my postgress am in my postgress directory in my in my postgress database directory in my in my postgress database directory in my in my postgress database uh as the postgress user so if I do L uh as the postgress user so if I do L uh as the postgress user so if I do L here I see the the databases that are here I see the the databases that are here I see the the databases that are here if I then con I'm now connected to here if I then con I'm now connected to here if I then con I'm now connected to the postgress database already so if I the postgress database already so if I the postgress database already so if I run DT then I see I have a public schema run DT then I see I have a public schema run DT then I see I have a public schema with the Shelly sensor data table so if with the Shelly sensor data table so if with the Shelly sensor data table so if I do then if I want to see the data I do then if I want to see the data I do then if I want to see the data that's in the table then I do that's in the table then I do that's in the table then I do select star from Shelly sensor data and select star from Shelly sensor data and select star from Shelly sensor data and here we go here is the data that is in here we go here is the data that is in here we go here is the data that is in my my my database so we see that it has a database so we see that it has a database so we see that it has a timestamp device ID and then it sets up timestamp device ID and then it sets up timestamp device ID and then it sets up the temperature the humidity the battery

  14. the temperature the humidity the battery the temperature the humidity the battery and the error so this is all working as and the error so this is all working as and the error so this is all working as intended you might think oh I want to intended you might think oh I want to intended you might think oh I want to have all of this in one row and that is have all of this in one row and that is have all of this in one row and that is something I I spoke at length with uh something I I spoke at length with uh something I I spoke at length with uh with uh Claude about Claude AI because I with uh Claude about Claude AI because I with uh Claude about Claude AI because I I when I'm coding I use Claude a I when I'm coding I use Claude a I when I'm coding I use Claude a lot and because I'm reading my my whole lot and because I'm reading my my whole lot and because I'm reading my my whole intention is reading this in grafana and intention is reading this in grafana and intention is reading this in grafana and then it is a time series database and then it is a time series database and then it is a time series database and from my understanding is that it is from my understanding is that it is from my understanding is that it is common practice to have each metric with common practice to have each metric with common practice to have each metric with its own Tim stamp so in this way I can its own Tim stamp so in this way I can its own Tim stamp so in this way I can actually track even though it's just a actually track even though it's just a actually track even though it's just a few milliseconds of difference at least few milliseconds of difference at least few milliseconds of difference at least I know the exact moment when this this I know the exact moment when this this I know the exact moment when this this metric was actually being entered into metric was actually being entered into metric was actually being entered into the the the database so this is how I uh this is database so this is how I uh this is database so this is how I uh this is what the data looks like now another what the data looks like now another what the data looks like now another thing I wanted to do is I wanted to use thing I wanted to do is I wanted to use thing I wanted to do is I wanted to use PG admin for this I wanted PG admin for this I wanted PG admin for this I wanted to PG admin 4 so now I have PG admin to PG admin 4 so now I have PG admin to PG admin 4 so now I have PG admin here this is just running locally on my here this is just running locally on my here this is just running locally on my Mac OS but in Mac OS but in Mac OS but in here just continue okay so in here you have these continue okay so in here you have these databases so let's can I so so when you databases so let's can I so so when you databases so let's can I so so when you first open PG admin this was new to me I first open PG admin this was new to me I first open PG admin this was new to me I I only been doing this in the CLI but

  15. I only been doing this in the CLI but I only been doing this in the CLI but you see this local Dev you have to set you see this local Dev you have to set you see this local Dev you have to set up your connection so that that looks up your connection so that that looks up your connection so that that looks like let's see can like let's see can like let's see can I how can I show the I how can I show the I how can I show the connection connection connection uh properties here so here is there's uh properties here so here is there's uh properties here so here is there's local Dev and then the connection and local Dev and then the connection and local Dev and then the connection and this is just Local Host because the this is just Local Host because the this is just Local Host because the container Port is forwarded to my local container Port is forwarded to my local container Port is forwarded to my local host by Docker compose and then you uh host by Docker compose and then you uh host by Docker compose and then you uh select the the parameters and you have select the the parameters and you have select the the parameters and you have to put in your password and then it to put in your password and then it to put in your password and then it works now when you first open this all works now when you first open this all works now when you first open this all you see is just databases and postgress you see is just databases and postgress you see is just databases and postgress and I had tried PG admin in the past but and I had tried PG admin in the past but and I had tried PG admin in the past but I never really I never really I never really understood like where do I actually see understood like where do I actually see understood like where do I actually see my data how how do I do it so I watched my data how how do I do it so I watched my data how how do I do it so I watched a few videos I I figured it out and now a few videos I I figured it out and now a few videos I I figured it out and now I know a lot more about what's going on I know a lot more about what's going on I know a lot more about what's going on what all these things mean so so you go what all these things mean so so you go what all these things mean so so you go into schemas and then public because into schemas and then public because into schemas and then public because that's what we saw in the CLI as well that's what we saw in the CLI as well that's what we saw in the CLI as well and here again there's an overwhelming and here again there's an overwhelming and here again there's an overwhelming amount of things that are in here and I amount of things that are in here and I amount of things that are in here and I never really knew where I needed to never really knew where I needed to never really knew where I needed to click in order to see my data right is click in order to see my data right is click in order to see my data right is it foreign tables is it Aggregates I had it foreign tables is it Aggregates I had it foreign tables is it Aggregates I had no idea so then I figured out okay it's no idea so then I figured out okay it's no idea so then I figured out okay it's tables so I open that and then here I tables so I open that and then here I tables so I open that and then here I see all of the different see all of the different see all of the different tables and in the table there are tables and in the table there are tables and in the table there are columns now if I want to see the data

  16. columns now if I want to see the data columns now if I want to see the data from here I can do view edit data from here I can do view edit data from here I can do view edit data like it's not very straightforward like it's not very straightforward like it's not very straightforward there's not like a real button here that there's not like a real button here that there's not like a real button here that says show data or something like that it says show data or something like that it says show data or something like that it it took a while to figure all of this it took a while to figure all of this it took a while to figure all of this out but when I do right click on the out but when I do right click on the out but when I do right click on the table then finally you see view edit table then finally you see view edit table then finally you see view edit data and I can take the first 100 rows data and I can take the first 100 rows data and I can take the first 100 rows for example all right great now I see my for example all right great now I see my for example all right great now I see my data this was something that that I had data this was something that that I had data this was something that that I had learned in this process because as I was learned in this process because as I was learned in this process because as I was coding as I was coding as I was coding as I was developing I I didn't know like I I developing I I didn't know like I I developing I I didn't know like I I wrote this create table function but it wrote this create table function but it wrote this create table function but it I I messed up a few times I didn't know I I messed up a few times I didn't know I I messed up a few times I didn't know what exactly what was going where I what exactly what was going where I what exactly what was going where I didn't know what a table actually was didn't know what a table actually was didn't know what a table actually was and I needed to figure all of this out and I needed to figure all of this out and I needed to figure all of this out and I wanted to see pH physically and I wanted to see pH physically and I wanted to see pH physically visually what was going on in my visually what was going on in my visually what was going on in my database and this was super helpful to database and this was super helpful to database and this was super helpful to actually see it visually like this actually see it visually like this actually see it visually like this because this is the first time that I because this is the first time that I because this is the first time that I actually understood that a database is actually understood that a database is actually understood that a database is actually just an Excel sheet right it's actually just an Excel sheet right it's actually just an Excel sheet right it's just oh a table is just a collection of just oh a table is just a collection of just oh a table is just a collection of columns a table is basically just an columns a table is basically just an columns a table is basically just an Excel sheet in in my limited Excel sheet in in my limited Excel sheet in in my limited understanding so a table is a limited a understanding so a table is a limited a understanding so a table is a limited a table is just a collection of columns table is just a collection of columns table is just a collection of columns here each of these is a column and every here each of these is a column and every here each of these is a column and every column has

  17. column has column has rows it's just so simple I I I don't rows it's just so simple I I I don't rows it's just so simple I I I don't know why but it never clicked for me know why but it never clicked for me know why but it never clicked for me until this moment until I actually until this moment until I actually until this moment until I actually started to to put things in databases started to to put things in databases started to to put things in databases myself programmatically and wanting to myself programmatically and wanting to myself programmatically and wanting to put things exactly where I wanted them put things exactly where I wanted them put things exactly where I wanted them so uh again everything is on a separate so uh again everything is on a separate so uh again everything is on a separate row with its own timestamp if this is a row with its own timestamp if this is a row with its own timestamp if this is a horrible practice ice please teach me horrible practice ice please teach me horrible practice ice please teach me like I I don't I'm not a data engineer I like I I don't I'm not a data engineer I like I I don't I'm not a data engineer I don't know much about this and I want to don't know much about this and I want to don't know much about this and I want to learn so if you're watching this and learn so if you're watching this and learn so if you're watching this and you're cringing because you see this you're cringing because you see this you're cringing because you see this please explain to me and and teach me please explain to me and and teach me please explain to me and and teach me because um the only thing that matters because um the only thing that matters because um the only thing that matters to me is the truth and I always want to to me is the truth and I always want to to me is the truth and I always want to become a better become a better become a better engineer now here we see that we have engineer now here we see that we have engineer now here we see that we have these entries already so that is done by these entries already so that is done by these entries already so that is done by the psychop PG function and it in the psychop PG function and it in the psychop PG function and it in inserts all of these things into to my inserts all of these things into to my inserts all of these things into to my database so this is the running the database so this is the running the database so this is the running the locally running database that's running locally running database that's running locally running database that's running on my kubernetes on my kubernetes on my kubernetes cluster on my Docker on my MacBook I cluster on my Docker on my MacBook I cluster on my Docker on my MacBook I mean this is not running on my mean this is not running on my mean this is not running on my kubernetes cluster so this was already a kubernetes cluster so this was already a kubernetes cluster so this was already a really nice learning experience I mean I really nice learning experience I mean I really nice learning experience I mean I I learned how to um let's close the I learned how to um let's close the I learned how to um let's close the docker container docker container docker container now or the docker compos setup so this is this has already been a a so this is this has already been a a great learning experience right I great learning experience right I great learning experience right I learned how to set up a table on a

  18. learned how to set up a table on a learned how to set up a table on a postgress database what it actually postgress database what it actually postgress database what it actually means I learned how to insert data and means I learned how to insert data and means I learned how to insert data and again just uh I needed to log these again just uh I needed to log these again just uh I needed to log these things right I needed to show things things right I needed to show things things right I needed to show things properly in my container logs and like properly in my container logs and like properly in my container logs and like these SQL queries I knew a bit of SQL these SQL queries I knew a bit of SQL these SQL queries I knew a bit of SQL but now I actually know what this means but now I actually know what this means but now I actually know what this means I didn't know what a primary key was I didn't know what a primary key was I didn't know what a primary key was right I I I had I had restored them at right I I I had I had restored them at right I I I had I had restored them at work but I never really took the time to work but I never really took the time to work but I never really took the time to actually know what it was well now I do actually know what it was well now I do actually know what it was well now I do and this is what these little these and this is what these little these and this is what these little these little silly projects that seem so small little silly projects that seem so small little silly projects that seem so small can really make these things click like can really make these things click like can really make these things click like when when things seem overwhelming go to when when things seem overwhelming go to when when things seem overwhelming go to the fundamentals and then Tinker with it the fundamentals and then Tinker with it the fundamentals and then Tinker with it and and this is what why a home lab is and and this is what why a home lab is and and this is what why a home lab is so important you Tinker with things so important you Tinker with things so important you Tinker with things so I have so I have so I have uh I have my database set up it's uh I have my database set up it's uh I have my database set up it's running locally on Docker compose I had running locally on Docker compose I had running locally on Docker compose I had a way of setting it up because this is a way of setting it up because this is a way of setting it up because this is devops right you when you're developing devops right you when you're developing devops right you when you're developing something you don't just run the the something you don't just run the the something you don't just run the the stuff locally all the time no you stuff locally all the time no you stuff locally all the time no you instantly take the time to containerize instantly take the time to containerize instantly take the time to containerize it you write a Docker compos at yaml so it you write a Docker compos at yaml so it you write a Docker compos at yaml so every time you create a every time you create a every time you create a different um you create a change you can different um you create a change you can different um you create a change you can actually test it with a fresh database actually test it with a fresh database actually test it with a fresh database right you can you can test right you can you can test right you can you can test things so so far so good I have a things so so far so good I have a things so so far so good I have a working container I have a working

  19. working container I have a working working container I have a working Docker compos setup now it's time to Docker compos setup now it's time to Docker compos setup now it's time to actually push this to GitHub so I have actually push this to GitHub so I have actually push this to GitHub so I have this in a local repo but for I you can this in a local repo but for I you can this in a local repo but for I you can like build the docker image locally and like build the docker image locally and like build the docker image locally and push that but that's not very devops push that but that's not very devops push that but that's not very devops right so what we do right so what we do right so what we do is we set up a workflow. yl so this is a is we set up a workflow. yl so this is a is we set up a workflow. yl so this is a GitHub actions workflow this is for free GitHub actions workflow this is for free GitHub actions workflow this is for free for free and what it does is if I go to for free and what it does is if I go to for free and what it does is if I go to my Shelly repo we see here that I have my Shelly repo we see here that I have my Shelly repo we see here that I have tags here tags here tags here tags and these tags are generated tags and these tags are generated tags and these tags are generated automatically based on the conventional automatically based on the conventional automatically based on the conventional commits that I push to this repo if you commits that I push to this repo if you commits that I push to this repo if you don't know what that means look up don't know what that means look up don't know what that means look up conventional commits it's a standard of conventional commits it's a standard of conventional commits it's a standard of how to form ulate your commit how to form ulate your commit how to form ulate your commit messages and then these GitHub actions messages and then these GitHub actions messages and then these GitHub actions will push a package to the GitHub will push a package to the GitHub will push a package to the GitHub container registry Shelly and with the container registry Shelly and with the container registry Shelly and with the latest tag like latest tag like latest tag like this so how how do we do this this so how how do we do this this so how how do we do this well we need a way to automatically well we need a way to automatically well we need a way to automatically increment the tags with based on the increment the tags with based on the increment the tags with based on the commit message for that you use this commit message for that you use this commit message for that you use this GitHub action the samver action the this GitHub action the samver action the this GitHub action the samver action the this will get a um it defaults to the patch will get a um it defaults to the patch will get a um it defaults to the patch version so the the last digit in the

  20. version so the the last digit in the version so the the last digit in the 0.0.0 and whenever I run a feat commit 0.0.0 and whenever I run a feat commit 0.0.0 and whenever I run a feat commit then it will upgrade the minor then it will upgrade the minor then it will upgrade the minor version when I and then eventually when version when I and then eventually when version when I and then eventually when I do a breaking change that's when I I do a breaking change that's when I I do a breaking change that's when I have to do a feed uh exclamation mark I have to do a feed uh exclamation mark I have to do a feed uh exclamation mark I believe that's when it will upgrade the believe that's when it will upgrade the believe that's when it will upgrade the major version so it it increments the major version so it it increments the major version so it it increments the tag it pushes the new tag to the repo tag it pushes the new tag to the repo tag it pushes the new tag to the repo and then it simply logs into the GitHub and then it simply logs into the GitHub and then it simply logs into the GitHub container registry using my GitHub token container registry using my GitHub token container registry using my GitHub token uh that is this is just a standard uh that is this is just a standard uh that is this is just a standard variable that's available in every repo variable that's available in every repo variable that's available in every repo and then we simply just build the the and then we simply just build the the and then we simply just build the the doc the container image based on a doc the container image based on a doc the container image based on a Docker file and we push that to my own Docker file and we push that to my own Docker file and we push that to my own GitHub action to my GitHub container GitHub action to my GitHub container GitHub action to my GitHub container registry on my own username very easy registry on my own username very easy registry on my own username very easy but pended with the the the semantic but pended with the the the semantic but pended with the the the semantic versioning as a tag so that is really versioning as a tag so that is really versioning as a tag so that is really cool now we have our our container image cool now we have our our container image cool now we have our our container image being built and pushed to GitHub now the being built and pushed to GitHub now the being built and pushed to GitHub now the next part comes with getting it into my next part comes with getting it into my next part comes with getting it into my kubernetes kubernetes kubernetes cluster for that we go to my home lab cluster for that we go to my home lab cluster for that we go to my home lab repo so this is my home lab repo it repo so this is my home lab repo it repo so this is my home lab repo it contains all of the git Ops contains all of the git Ops contains all of the git Ops configuration for my home lab and um if configuration for my home lab and um if configuration for my home lab and um if you want like if you are interested in you want like if you are interested in you want like if you are interested in setting up your own home lab and and

  21. setting up your own home lab and and setting up your own home lab and and finding a community with other people finding a community with other people finding a community with other people who are interested in kubernetes home who are interested in kubernetes home who are interested in kubernetes home Labs you need to take a look at my Labs you need to take a look at my Labs you need to take a look at my cubecraft school Community because this place is a Community because this place is a fantastic place to network with fantastic place to network with fantastic place to network with like-minded Engineers we are all posting like-minded Engineers we are all posting like-minded Engineers we are all posting new suggestions and new applications new new suggestions and new applications new new suggestions and new applications new things about home labbing about things about home labbing about things about home labbing about improving your career which improving your career which improving your career which certifications to get we're all about certifications to get we're all about certifications to get we're all about kubernetes and and devops and Linux and kubernetes and and devops and Linux and kubernetes and and devops and Linux and it's just a great Community to network it's just a great Community to network it's just a great Community to network and when you get become a member for of and when you get become a member for of and when you get become a member for of this community you also get unlimited this community you also get unlimited this community you also get unlimited access to all of my courses about access to all of my courses about access to all of my courses about kubernetes about Linux about note taking kubernetes about Linux about note taking kubernetes about Linux about note taking it's a great great resource it's only 30 it's a great great resource it's only 30 it's a great great resource it's only 30 bucks 35 bucks a month you won't regret bucks 35 bucks a month you won't regret bucks 35 bucks a month you won't regret it seriously and you can cancel anytime it seriously and you can cancel anytime it seriously and you can cancel anytime the best place to network with the best place to network with the best place to network with like-minded individuals is here and you like-minded individuals is here and you like-minded individuals is here and you can get help with setting up your home can get help with setting up your home can get help with setting up your home lab so in my home lab repo I have all of my git Ops repo I have all of my git Ops configuration so what this means is that configuration so what this means is that configuration so what this means is that I have flux running on my kubernetes I have flux running on my kubernetes I have flux running on my kubernetes cluster and I is constantly monitoring cluster and I is constantly monitoring cluster and I is constantly monitoring my my um homel lab repo for changes and my my um homel lab repo for changes and my my um homel lab repo for changes and whenever it sees a change it's going to whenever it sees a change it's going to whenever it sees a change it's going to deploy the resources on my kubernetes deploy the resources on my kubernetes deploy the resources on my kubernetes cluster I don't apply things to my cluster I don't apply things to my cluster I don't apply things to my cluster flux does that for me it's all

  22. cluster flux does that for me it's all cluster flux does that for me it's all automated so I needed to set up my my automated so I needed to set up my my automated so I needed to set up my my database on my kubernetes cluster database on my kubernetes cluster database on my kubernetes cluster because I run databases on in kubernetes because I run databases on in kubernetes because I run databases on in kubernetes I don't run databases elsewhere it's all I don't run databases elsewhere it's all I don't run databases elsewhere it's all in my kubernetes cluster so to do that in my kubernetes cluster so to do that in my kubernetes cluster so to do that let me show you the configuration I let me show you the configuration I let me show you the configuration I created for my um Shelly setup so first created for my um Shelly setup so first created for my um Shelly setup so first we have a customization not yaml it we have a customization not yaml it we have a customization not yaml it looks at Bass shell and then it look it looks at Bass shell and then it look it looks at Bass shell and then it look it loads these yaml files and this is all loads these yaml files and this is all loads these yaml files and this is all available for for free in my public repo available for for free in my public repo available for for free in my public repo Misha venberg homelab so the database. Misha venberg homelab so the database. Misha venberg homelab so the database. yaml is done with the Enterprise DB yaml is done with the Enterprise DB yaml is done with the Enterprise DB operator this yaml uh I'm going to be operator this yaml uh I'm going to be operator this yaml uh I'm going to be creating a course on the the EDB creating a course on the the EDB creating a course on the the EDB operator in in this winter so if you are operator in in this winter so if you are operator in in this winter so if you are interested in that state interested in that state interested in that state tune but this sets up the database in my tune but this sets up the database in my tune but this sets up the database in my kubernetes cluster and it sets up an kubernetes cluster and it sets up an kubernetes cluster and it sets up an automatic backup to Microsoft Azure so automatic backup to Microsoft Azure so automatic backup to Microsoft Azure so all of my databases are being backed up all of my databases are being backed up all of my databases are being backed up to Azure every night and it's all stored to Azure every night and it's all stored to Azure every night and it's all stored in storage accounts now I won't go in storage accounts now I won't go in storage accounts now I won't go through all of the details of this through all of the details of this through all of the details of this configuration because it's quite configuration because it's quite configuration because it's quite complicated ated but what I do say what complicated ated but what I do say what complicated ated but what I do say what I will say is that I store all of my I will say is that I store all of my I will say is that I store all of my credentials in Azure key volts and in credentials in Azure key volts and in credentials in Azure key volts and in order to do that I have a utils script order to do that I have a utils script order to do that I have a utils script here in my uh in my home lab and this

  23. here in my uh in my home lab and this here in my uh in my home lab and this there is another python script that there is another python script that there is another python script that will uh create all of the secrets in will uh create all of the secrets in will uh create all of the secrets in Azure in the Azure key Vault and then Azure in the Azure key Vault and then Azure in the Azure key Vault and then also generate the database manifests also generate the database manifests also generate the database manifests here that you see here all of this is here that you see here all of this is here that you see here all of this is generated by python this this manifests generated by python this this manifests generated by python this this manifests I wrot I I'm deploying so often that I I wrot I I'm deploying so often that I I wrot I I'm deploying so often that I automated that process as well so this automated that process as well so this automated that process as well so this is automatically generated by is automatically generated by is automatically generated by python so we have the database at yaml python so we have the database at yaml python so we have the database at yaml and we have a scheduled backup for set and we have a scheduled backup for set and we have a scheduled backup for set database now as we saw in the database now as we saw in the database now as we saw in the customization yl it it looks at the base customization yl it it looks at the base customization yl it it looks at the base shell directory so here we have base and shell directory so here we have base and shell directory so here we have base and then we have Shelly and here we have a then we have Shelly and here we have a then we have Shelly and here we have a deployment yaml so this just simply deployment yaml so this just simply deployment yaml so this just simply takes that image that we saw in the in takes that image that we saw in the in takes that image that we saw in the in the GitHub actions this is the same name the GitHub actions this is the same name the GitHub actions this is the same name but it also append the version and I but it also append the version and I but it also append the version and I will come back to that uh we read the will come back to that uh we read the will come back to that uh we read the the config map and the secret ref so I the config map and the secret ref so I the config map and the secret ref so I have a secret that is um being created have a secret that is um being created have a secret that is um being created from the Azure key VA Secrets using the from the Azure key VA Secrets using the from the Azure key VA Secrets using the Azure key VA Azure key VA Azure key VA operator then it it takes it reads out operator then it it takes it reads out operator then it it takes it reads out the values from the Azure key Vault and the values from the Azure key Vault and the values from the Azure key Vault and then it creates Secrets based on then it creates Secrets based on then it creates Secrets based on that so I have my deployment here and it that so I have my deployment here and it that so I have my deployment here and it it just simply reads in the config map it just simply reads in the config map it just simply reads in the config map which contains a key value

  24. which contains a key value which contains a key value pair a few key value pairs with the the pair a few key value pairs with the the pair a few key value pairs with the the location of my mqtt broker and with location of my mqtt broker and with location of my mqtt broker and with which host which which postgress host it which host which which postgress host it which host which which postgress host it needs to connect to Etc and of course it needs to connect to Etc and of course it needs to connect to Etc and of course it needs to read in the secrets that I just needs to read in the secrets that I just needs to read in the secrets that I just showed you that's it and then it just showed you that's it and then it just showed you that's it and then it just the way these CSI secret drivers work is the way these CSI secret drivers work is the way these CSI secret drivers work is that you have to mount them into the that you have to mount them into the that you have to mount them into the Container uh in order for them to be Container uh in order for them to be Container uh in order for them to be available as environment variables as available as environment variables as available as environment variables as well so that's what I do here too so well so that's what I do here too so well so that's what I do here too so here the container here the container here the container is it's a very simple deployment that is it's a very simple deployment that is it's a very simple deployment that just takes the the the container image just takes the the the container image just takes the the the container image that I that I that I built now the cool thing is when I built now the cool thing is when I built now the cool thing is when I deploy this this is now being deployed deploy this this is now being deployed deploy this this is now being deployed by flux so if I do go to my here I can by flux so if I do go to my here I can by flux so if I do go to my here I can do flux get customizations this fgk is a do flux get customizations this fgk is a do flux get customizations this fgk is a shorthand for flux get shorthand for flux get shorthand for flux get customizations and my all my customizations and my all my customizations and my all my customizations are in order right now customizations are in order right now customizations are in order right now now let's see let's see this workflow at now let's see let's see this workflow at now let's see let's see this workflow at work so let's go to my Shelly repo and work so let's go to my Shelly repo and work so let's go to my Shelly repo and there was actually a bit of a small there was actually a bit of a small there was actually a bit of a small mistake in my setup I was using mistake in my setup I was using mistake in my setup I was using postgress 13 and I needed to update this postgress 13 and I needed to update this postgress 13 and I needed to update this to 16 so I'm going to commit this change to 16 so I'm going to commit this change to 16 so I'm going to commit this change to my main branch and yes I could create to my main branch and yes I could create to my main branch and yes I could create a pool request and then merge that but a pool request and then merge that but a pool request and then merge that but since it's just me working on this since it's just me working on this since it's just me working on this project I have no problems with

  25. project I have no problems with project I have no problems with committing straight to the main branch committing straight to the main branch committing straight to the main branch so let's first do a get pull and then my so let's first do a get pull and then my so let's first do a get pull and then my yub key is prompting yub key is prompting yub key is prompting me to see if I'm actually um allowed to me to see if I'm actually um allowed to me to see if I'm actually um allowed to do that and yes I am so then I let's do that and yes I am so then I let's do that and yes I am so then I let's commit this and say uh chore commit this and say uh chore commit this and say uh chore update update update postgress version in Docker postgress version in Docker postgress version in Docker compose so now I I have a chore commit compose so now I I have a chore commit compose so now I I have a chore commit and since it's not a feed commit now the and since it's not a feed commit now the and since it's not a feed commit now the GitHub actions should only upgrade to GitHub actions should only upgrade to GitHub actions should only upgrade to v1.2 because it's not a minor version so v1.2 because it's not a minor version so v1.2 because it's not a minor version so I push Shelly if I go to actions now we should Shelly if I go to actions now we should see yes we see a a get up actions flow see yes we see a a get up actions flow see yes we see a a get up actions flow running and let's see uh oh it is running and let's see uh oh it is running and let's see uh oh it is already finished almost so it's now already finished almost so it's now already finished almost so it's now actually building and actually building and actually building and pushing so that is really good it's it's pushing so that is really good it's it's pushing so that is really good it's it's now building Docker image and push now building Docker image and push now building Docker image and push pushing a new tag so let's see what the pushing a new tag so let's see what the pushing a new tag so let's see what the new tag is did that work properly let's new tag is did that work properly let's new tag is did that work properly let's see it checks out get next version let's see it checks out get next version let's see it checks out get next version let's see what that looks like comparing see what that looks like comparing see what that looks like comparing against latest tag against latest tag against latest tag v1.1 and then the next version is 0

  26. v1.1 and then the next version is 0 v1.1 and then the next version is 0 v1.2 so it is actually detecting the v1.2 so it is actually detecting the v1.2 so it is actually detecting the correct version It's upgrading the correct version It's upgrading the correct version It's upgrading the version automatically and now it's version automatically and now it's version automatically and now it's pushing the new the new version of this pushing the new the new version of this pushing the new the new version of this container image to my uh GitHub container image to my uh GitHub container image to my uh GitHub container container container registry really cool so even though this registry really cool so even though this registry really cool so even though this is not an actual change to my is not an actual change to my is not an actual change to my application it still increase the application it still increase the application it still increase the version right but that gives me a chance version right but that gives me a chance version right but that gives me a chance to actually demonstrate how I a how I to actually demonstrate how I a how I to actually demonstrate how I a how I upgrade things in my kubernetes cluster upgrade things in my kubernetes cluster upgrade things in my kubernetes cluster automatically so if I run K9s now I will automatically so if I run K9s now I will automatically so if I run K9s now I will see here all these are all my my um my see here all these are all my my um my see here all these are all my my um my pods that are currently running and in pods that are currently running and in pods that are currently running and in my cluster I run renovate and that is my cluster I run renovate and that is my cluster I run renovate and that is running as a crown job and that has last running as a crown job and that has last running as a crown job and that has last run for TW 27 minutes ago so if I go to run for TW 27 minutes ago so if I go to run for TW 27 minutes ago so if I go to my home lab my home lab my home lab repo and if I check out my pool requests repo and if I check out my pool requests repo and if I check out my pool requests here we see that there renovate creates here we see that there renovate creates here we see that there renovate creates pool requests for me that upgrades pool requests for me that upgrades pool requests for me that upgrades or that or that or that will change the version the newer will change the version the newer will change the version the newer version that it finds on GitHub this is version that it finds on GitHub this is version that it finds on GitHub this is the power of gitops this is why you want the power of gitops this is why you want the power of gitops this is why you want to run stuff with gitops because I don't to run stuff with gitops because I don't to run stuff with gitops because I don't need to track updates right renovate need to track updates right renovate need to track updates right renovate does that for me so let's do that I have does that for me so let's do that I have does that for me so let's do that I have this Cron job and then I'm going to

  27. this Cron job and then I'm going to this Cron job and then I'm going to press T to trigger that Cron job so if I press T to trigger that Cron job so if I press T to trigger that Cron job so if I see it here if I go to all Nam spaces see it here if I go to all Nam spaces see it here if I go to all Nam spaces and back to and back to and back to now here I see this manual job running now here I see this manual job running now here I see this manual job running now I can log it and this these are logs now I can log it and this these are logs now I can log it and this these are logs that you see from my from my uh renovate that you see from my from my uh renovate that you see from my from my uh renovate pod that's now running and now we should pod that's now running and now we should pod that's now running and now we should see a new um update for Shelly and I see a new um update for Shelly and I see a new um update for Shelly and I think I saw it already yeah here we go think I saw it already yeah here we go think I saw it already yeah here we go PR title PR PR title PR PR title PR created update Misha venberg Shelly to created update Misha venberg Shelly to created update Misha venberg Shelly to Docker tag v01 two pretty Docker tag v01 two pretty Docker tag v01 two pretty cool so if I go to my pull requests cool so if I go to my pull requests cool so if I go to my pull requests again we see indeed we now have a new um again we see indeed we now have a new um again we see indeed we now have a new um update of this shell Docker tag and when update of this shell Docker tag and when update of this shell Docker tag and when I go in here and I merge it flux is I go in here and I merge it flux is I go in here and I merge it flux is going to pick up this going to pick up this going to pick up this change so before I merge it let's just change so before I merge it let's just change so before I merge it let's just check out what's running now so we see check out what's running now so we see check out what's running now so we see our Shelly pod over here this is now our Shelly pod over here this is now our Shelly pod over here this is now running in my kubernetes cluster and running in my kubernetes cluster and running in my kubernetes cluster and when I press L it shows the logs that it when I press L it shows the logs that it when I press L it shows the logs that it has been inserting into the database has been inserting into the database has been inserting into the database right so the last insertion right so the last insertion right so the last insertion is is is uh let's see the last temperature that uh let's see the last temperature that uh let's see the last temperature that it has entered is it has entered is it has entered is 23.6 de so let's check out our

  28. and now we see because I'm sitting in and now we see because I'm sitting in this room with my door closed we see this room with my door closed we see this room with my door closed we see that the temperature has risen a lot that the temperature has risen a lot that the temperature has risen a lot it's actually 24 almost 24 degrees in it's actually 24 almost 24 degrees in it's actually 24 almost 24 degrees in this room this room this room apparently uh because the the sensor is apparently uh because the the sensor is apparently uh because the the sensor is here with me and my office tends to be a here with me and my office tends to be a here with me and my office tends to be a bit warmer When I close the door because bit warmer When I close the door because bit warmer When I close the door because of the road noise that I don't want when of the road noise that I don't want when of the road noise that I don't want when I'm recording so we see that it's I'm recording so we see that it's I'm recording so we see that it's working right it's actually updating working right it's actually updating working right it's actually updating live now let's live now let's live now let's merge this pool request we're going to merge request we're going to merge it confirm and let's delete the confirm and let's delete the branch so now when I do a uh to speed branch so now when I do a uh to speed branch so now when I do a uh to speed like usually takes a few minutes for like usually takes a few minutes for like usually takes a few minutes for flux to pick this up but what I will do flux to pick this up but what I will do flux to pick this up but what I will do is I'm going to uh is I'm going to uh is I'm going to uh just um run a just um run a just um run a Reconciliation apps with source and and Reconciliation apps with source and and Reconciliation apps with source and and now I can if I run a now I can if I run a now I can if I run a watch now we can see in live what is watch now we can see in live what is watch now we can see in live what is happening right so it's now reconciling happening right so it's now reconciling happening right so it's now reconciling all of these customizations that I have all of these customizations that I have all of these customizations that I have and I have several because let me see and I have several because let me see and I have several because let me see let me let me let me just move to a smaller font size again just move to a smaller font size again just move to a smaller font size again here you now you can see it a little bit here you now you can see it a little bit here you now you can see it a little bit better it needs to cycle through all of better it needs to cycle through all of better it needs to cycle through all of these different customizations that I these different customizations that I these different customizations that I have so I have private resources that have so I have private resources that have so I have private resources that are deployed through a private repo it are deployed through a private repo it are deployed through a private repo it has all of the monitoring it has the

  29. has all of the monitoring it has the has all of the monitoring it has the infrastructure and then last comes the infrastructure and then last comes the infrastructure and then last comes the apps it's all dep it all depends on apps it's all dep it all depends on apps it's all dep it all depends on these different things because my apps these different things because my apps these different things because my apps need because the infrastructure needs to need because the infrastructure needs to need because the infrastructure needs to be there before we um see the before we be there before we um see the before we be there before we um see the before we can deploy the apps so let's see if we can deploy the apps so let's see if we can deploy the apps so let's see if we can we should see a new pod being can we should see a new pod being can we should see a new pod being started very soon started very soon started very soon here the the shell pod is here now here the the shell pod is here now here the the shell pod is here now running with an age of 12 running with an age of 12 running with an age of 12 hours and yeah here we go here's the new hours and yeah here we go here's the new hours and yeah here we go here's the new container creating it's pulling the new container creating it's pulling the new container creating it's pulling the new image and here we go we have it running image and here we go we have it running image and here we go we have it running it's now terminating the old one and it's now terminating the old one and it's now terminating the old one and let's check out the logs it's now let's check out the logs it's now let's check out the logs it's now inserting uh the data again because it inserting uh the data again because it inserting uh the data again because it will actually take the latest stuff from will actually take the latest stuff from will actually take the latest stuff from the mqtt sensor and now it's actually the mqtt sensor and now it's actually the mqtt sensor and now it's actually 24. 25° in my office over here it's 24. 25° in my office over here it's 24. 25° in my office over here it's actually very warm so and if I refresh actually very warm so and if I refresh actually very warm so and if I refresh here then we should here then we should here then we should see yeah here we see the new data point see yeah here we see the new data point see yeah here we see the new data point in my in my grafana dashboard already in my in my grafana dashboard already in my in my grafana dashboard already super cool right I mean yeah I'm really super cool right I mean yeah I'm really super cool right I mean yeah I'm really excited about this I I love this excited about this I I love this excited about this I I love this stuff I can just push a a a I can push a stuff I can just push a a a I can push a stuff I can just push a a a I can push a change to my GE rep change to my GE rep change to my GE rep it automatically builds the new it automatically builds the new it automatically builds the new container with a new tag and then the my

  30. container with a new tag and then the my container with a new tag and then the my renovate will pick up the new tag and I renovate will pick up the new tag and I renovate will pick up the new tag and I by just merging a pull request it by just merging a pull request it by just merging a pull request it deploys the new version of my deploys the new version of my deploys the new version of my application into my cluster this is why application into my cluster this is why application into my cluster this is why you want to run kubernetes and this is you want to run kubernetes and this is you want to run kubernetes and this is why you want to run giops it's fantastic so fantastic so we have our grafana dashboard and now we have our grafana dashboard and now we have our grafana dashboard and now this is running in a database right so this is running in a database right so this is running in a database right so if I let's let's check out the data n if I let's let's check out the data n if I let's let's check out the data n namespace so here we have my database namespace so here we have my database namespace so here we have my database running in running in running in kubernetes and this the EDB operator kubernetes and this the EDB operator kubernetes and this the EDB operator runs it in three runs it in three runs it in three replicas and we can also check out the replicas and we can also check out the replicas and we can also check out the database database database itself in grafana so if itself in grafana so if itself in grafana so if I let's see uh I let's see uh I let's see uh here now I have my data um this is the here now I have my data um this is the here now I have my data um this is the actual database that is that we queried actual database that is that we queried actual database that is that we queried when we show this temperature graph that when we show this temperature graph that when we show this temperature graph that we just saw this is the actual the these we just saw this is the actual the these we just saw this is the actual the these are the stats for that database and are the stats for that database and are the stats for that database and actually using quite a lot of memory so actually using quite a lot of memory so actually using quite a lot of memory so maybe I should increase the memory for maybe I should increase the memory for maybe I should increase the memory for that but here we see all of the the good that but here we see all of the the good that but here we see all of the the good stuff everything is working properly so stuff everything is working properly so stuff everything is working properly so what I can do is I can I can either what I can do is I can I can either what I can do is I can I can either shell in to my database psql and maybe I shell in to my database psql and maybe I shell in to my database psql and maybe I should increase the font size should increase the font size should increase the font size again you go so I here have my postgress

  31. again you go so I here have my postgress again you go so I here have my postgress and here I see the Shelly database so I and here I see the Shelly database so I and here I see the Shelly database so I have to connect to Shelly and if I list have to connect to Shelly and if I list have to connect to Shelly and if I list the tables here I see the Shelly sensor the tables here I see the Shelly sensor the tables here I see the Shelly sensor data and if I then uh select star data and if I then uh select star data and if I then uh select star from Shelly sensor data uh select uh select star from Shell here we go now we see all of the Shell here we go now we see all of the the data that's in that data in that the data that's in that data in that the data that's in that data in that table table table right so that is how I can query it but right so that is how I can query it but right so that is how I can query it but I also wanted to use PG admin there now I also wanted to use PG admin there now I also wanted to use PG admin there now I could connect with my local PG admin I could connect with my local PG admin I could connect with my local PG admin but I wanted to do something fun and as but I wanted to do something fun and as but I wanted to do something fun and as you might have noticed there is a PG you might have noticed there is a PG you might have noticed there is a PG admin container running in this data admin container running in this data admin container running in this data namespace uh since I'm running several namespace uh since I'm running several namespace uh since I'm running several databases on my cluster I thought it databases on my cluster I thought it databases on my cluster I thought it would be handy to just run it on my would be handy to just run it on my would be handy to just run it on my cluster too so if I check out my cluster too so if I check out my cluster too so if I check out my homepage here then in the left you will homepage here then in the left you will homepage here then in the left you will see a PG admin so I open that one up and see a PG admin so I open that one up and see a PG admin so I open that one up and here is my PG admin that is running uh here is my PG admin that is running uh here is my PG admin that is running uh in the container on my kubernetes in the container on my kubernetes in the container on my kubernetes cluster and it's Direct cluster and it's Direct cluster and it's Direct L directly connected to my database L directly connected to my database L directly connected to my database there so I've only configured it with there so I've only configured it with there so I've only configured it with this server here but I can add many

  32. this server here but I can add many this server here but I can add many server all the servers that I have in my server all the servers that I have in my server all the servers that I have in my kubernetes cluster but if I check out kubernetes cluster but if I check out kubernetes cluster but if I check out the columns or if I just check out the the columns or if I just check out the the columns or if I just check out the data here and view edit data and I can data here and view edit data and I can data here and view edit data and I can see all of the rows in my actual see all of the rows in my actual see all of the rows in my actual production database uh of Shelly so production database uh of Shelly so production database uh of Shelly so these are all the data points that you these are all the data points that you these are all the data points that you see in grafana that it has s stored so see in grafana that it has s stored so see in grafana that it has s stored so far now how do I get this stuff into far now how do I get this stuff into far now how do I get this stuff into grafana right well not surprisingly grafana right well not surprisingly grafana right well not surprisingly grafana is running in my kubernetes grafana is running in my kubernetes grafana is running in my kubernetes cluster so what I can do is I cluster so what I can do is I cluster so what I can do is I can add data can add data can add data sources sources sources here and these data sources are here and these data sources are here and these data sources are basically just the the connection in to basically just the the connection in to basically just the the connection in to the kuber to the databases that are the kuber to the databases that are the kuber to the databases that are running locally on that kubernetes running locally on that kubernetes running locally on that kubernetes cluster so I just use a kubernetes DNS cluster so I just use a kubernetes DNS cluster so I just use a kubernetes DNS formatted um domain to reach the service formatted um domain to reach the service formatted um domain to reach the service that um that the EDB operator exposes that um that the EDB operator exposes that um that the EDB operator exposes for these for these for these databases and when databases and when databases and when I added this data source then you can I added this data source then you can I added this data source then you can just query it using psql queries so when just query it using psql queries so when just query it using psql queries so when I go to my bedroom temperature panel I go to my bedroom temperature panel I go to my bedroom temperature panel here for here for here for example when I edit it what you see here example when I edit it what you see here example when I edit it what you see here is just a SQL query that's it you just

  33. is just a SQL query that's it you just is just a SQL query that's it you just query SQL and then you visualize it in query SQL and then you visualize it in query SQL and then you visualize it in grafana and this is why it's so nice to grafana and this is why it's so nice to grafana and this is why it's so nice to have your data in your own postest have your data in your own postest have your data in your own postest databases instead of Home assistant and databases instead of Home assistant and databases instead of Home assistant and uh no here I can just actually write the uh no here I can just actually write the uh no here I can just actually write the code that I want to see I've written the code that I want to see I've written the code that I want to see I've written the code that puts this into the database I code that puts this into the database I code that puts this into the database I know exactly what the database looks know exactly what the database looks know exactly what the database looks like which columns are there which like which columns are there which like which columns are there which tables are there where to look and I can tables are there where to look and I can tables are there where to look and I can I I I can uh decide which data I pull out in can uh decide which data I pull out in can uh decide which data I pull out in which Manner and the I'm going this is which Manner and the I'm going this is which Manner and the I'm going this is so nice I so nice I so nice I I I I if I can I'm going going to avoid I I I if I can I'm going going to avoid I I I if I can I'm going going to avoid home assistant and just store everything home assistant and just store everything home assistant and just store everything in my own databases because then I can in my own databases because then I can in my own databases because then I can control the database I can find tune it control the database I can find tune it control the database I can find tune it when I need to more have more when I need to more have more when I need to more have more performance like for this is ridiculous performance like for this is ridiculous performance like for this is ridiculous it's just nothing but when these things it's just nothing but when these things it's just nothing but when these things grow I want to have the control over the grow I want to have the control over the grow I want to have the control over the database right I I can choose to back database right I I can choose to back database right I I can choose to back everything up like if I am I logged in uh will this work in Azure I have my in uh will this work in Azure I have my storage account here and if I go to the storage account here and if I go to the storage account here and if I go to the storage storage storage browser and I go to my blob containers browser and I go to my blob containers browser and I go to my blob containers all of these databases are

  34. all of these databases are all of these databases are stored in my Azure account and these are stored in my Azure account and these are stored in my Azure account and these are backed up once a day so when I want to backed up once a day so when I want to backed up once a day so when I want to restore with the EDB operator I can just restore with the EDB operator I can just restore with the EDB operator I can just point it to this that to this um data point it to this that to this um data point it to this that to this um data that's stored in in the Azure cloud and that's stored in in the Azure cloud and that's stored in in the Azure cloud and it will restore from there so if my h it will restore from there so if my h it will restore from there so if my h house burns down I know exactly I I know house burns down I know exactly I I know house burns down I know exactly I I know that I can restore everything from the that I can restore everything from the that I can restore everything from the cloud whenever I want to it's just so cloud whenever I want to it's just so cloud whenever I want to it's just so fantastic and this only costs me like fantastic and this only costs me like fantastic and this only costs me like $12 a month 12 cents a month not dollars $12 a month 12 cents a month not dollars $12 a month 12 cents a month not dollars it's just because it's so small it it's just because it's so small it it's just because it's so small it doesn't cost doesn't cost doesn't cost anything so all of this is working anything so all of this is working anything so all of this is working and um it's being backed up I can check and um it's being backed up I can check and um it's being backed up I can check the data with PG admin in the cluster it the data with PG admin in the cluster it the data with PG admin in the cluster it is queried with is queried with is queried with grafana and that is how I have managed grafana and that is how I have managed grafana and that is how I have managed to read the sensor data from this thing to read the sensor data from this thing to read the sensor data from this thing in my kubernetes cluster and query it in my kubernetes cluster and query it in my kubernetes cluster and query it with grafana and have full control over with grafana and have full control over with grafana and have full control over my data everything is being deployed my data everything is being deployed my data everything is being deployed with Docker Docker compose it builds the with Docker Docker compose it builds the with Docker Docker compose it builds the image automatically image automatically image automatically and this is the the devops way to do it and this is the the devops way to do it and this is the the devops way to do it right you want to automate these right you want to automate these right you want to automate these things now I there's so much more I can things now I there's so much more I can things now I there's so much more I can do I can do more python testing I can do

  35. do I can do more python testing I can do do I can do more python testing I can do pre-commit hooks I can make sure that my pre-commit hooks I can make sure that my pre-commit hooks I can make sure that my images do not contain images do not contain images do not contain cves the first step is actually to first cves the first step is actually to first cves the first step is actually to first update my Docker container and then update my Docker container and then update my Docker container and then which I'm going to do after this video which I'm going to do after this video which I'm going to do after this video and then then I'm going to add a and then then I'm going to add a and then then I'm going to add a security context here because it should security context here because it should security context here because it should run it should not run as the root user run it should not run as the root user run it should not run as the root user it should run as the user that I it should run as the user that I it should run as the user that I configure in my Docker file Etc so configure in my Docker file Etc so configure in my Docker file Etc so there's just even with a silly project there's just even with a silly project there's just even with a silly project like this with a python file that is like this with a python file that is like this with a python file that is like 50 lines long or whatever it is you like 50 lines long or whatever it is you like 50 lines long or whatever it is you can go so deep and you can learn so much can go so deep and you can learn so much can go so deep and you can learn so much I've learned how to query Json data how I've learned how to query Json data how I've learned how to query Json data how to pick it up how to interact with m qtt to pick it up how to interact with m qtt to pick it up how to interact with m qtt how to store this stuff into databases how to store this stuff into databases how to store this stuff into databases and this is the power of Project based and this is the power of Project based and this is the power of Project based learning you define a small little learning you define a small little learning you define a small little project for yourself that you want to do project for yourself that you want to do project for yourself that you want to do for me it was I want to have this data for me it was I want to have this data for me it was I want to have this data in my own postgress database so I can in my own postgress database so I can in my own postgress database so I can quate with grafana and then you learn so quate with grafana and then you learn so quate with grafana and then you learn so much you have to learn about databases much you have to learn about databases much you have to learn about databases you have to learn how to set up a Docker you have to learn how to set up a Docker you have to learn how to set up a Docker compose how to set up Docker how to set compose how to set up Docker how to set compose how to set up Docker how to set up your gith up actions and I I learned up your gith up actions and I I learned up your gith up actions and I I learned that in a previous project and I could that in a previous project and I could that in a previous project and I could just pull that in into this project that just pull that in into this project that just pull that in into this project that didn't took much didn't took much didn't took much time so in summary this was a very fun time so in summary this was a very fun time so in summary this was a very fun day of tinkering yesterday a fun day of day of tinkering yesterday a fun day of day of tinkering yesterday a fun day of coding I have achieved what I wanted to

  36. coding I have achieved what I wanted to coding I have achieved what I wanted to do and I have acquired a taste for more do and I have acquired a taste for more do and I have acquired a taste for more it's so much fun to write your own code it's so much fun to write your own code it's so much fun to write your own code and deploy it in your own cluster I and deploy it in your own cluster I and deploy it in your own cluster I highly encourage you you learning this highly encourage you you learning this highly encourage you you learning this because all of this transfers directly because all of this transfers directly because all of this transfers directly to my work as a devops engineer it's all to my work as a devops engineer it's all to my work as a devops engineer it's all practice it's all it all contributes to practice it's all it all contributes to practice it's all it all contributes to becoming a better engineer so this was becoming a better engineer so this was becoming a better engineer so this was an example of how I approach projects an example of how I approach projects an example of how I approach projects and maybe it's an inspiration for you to and maybe it's an inspiration for you to and maybe it's an inspiration for you to to start doing your own projects it all to start doing your own projects it all to start doing your own projects it all starts with a home lab kubernetes starts with a home lab kubernetes starts with a home lab kubernetes cluster I'm currently working on a cluster I'm currently working on a cluster I'm currently working on a course for that and so if you're course for that and so if you're course for that and so if you're interested in that join the school interested in that join the school interested in that join the school Community before the price increases I Community before the price increases I Community before the price increases I highly encourage you to come and ask for highly encourage you to come and ask for highly encourage you to come and ask for help there because we're all about the help there because we're all about the help there because we're all about the same thing I will help you set up your same thing I will help you set up your same thing I will help you set up your kubernetes laptop your kubernetes home kubernetes laptop your kubernetes home kubernetes laptop your kubernetes home lab on a laptop if you want and um you lab on a laptop if you want and um you lab on a laptop if you want and um you can start tinkering from there so thank can start tinkering from there so thank can start tinkering from there so thank you so much for watching and I'll see you so much for watching and I'll see you so much for watching and I'll see you in the next video

Summary

The presenter, a DevOps engineer, discusses a project involving a Shelly temperature and humidity sensor for their bedroom to monitor sleep environment conditions. Dissatisfied with Home Assistant's interface and data loss issues, they decided to store this crucial data in their own PostgreSQL database, underscoring a growing appreciation for managing data independently. The practical takeaway is the benefit of owning and controlling your data for better insights and stability.

View original episode ↗