Loading video player...
Hey guys, Christian here. Today, let's
check out some of the new features in
the Docker and Kubernetes management
platform Portainer. Because Portainer
recently did a rebranding with new
colors, a new logo, but beyond the new
and shiny look of their website, they
also improved in some technical areas in
their management application. So, I
thought it's just about time that we
take a look together. Even though I
haven't really used Portainer a lot in
the recent past, but since I enabled the
Docker Swarm mode on some of my home lab
servers, by the way, check out the
Docker Swarm video if you haven't done
it already. There, I just realized
Portainer is a huge help because it's
great to manage Docker Swarm clusters.
And I've also tried out a few unexplored
features like the Portainer's Terraform
provider which brings some interesting
automation capabilities to that system
that really made me think if I should
use it more often in the future. We will
see. But at least I thought let's do a
quick run through together. Let's check
out the new features beyond the
rebranding and review some automation
features I haven't really covered yet on
my channel. And by the way, if you are
managing containers, clusters, and maybe
other services in your infrastructure,
it's also important to monitor these
systems and of course get notified about
any bottlenecks or problems. So that's
why you should use Czech K, the sponsor
of today's video. Checkm is a
comprehensive IT monitoring platform
that is scalable, automated, and highly
extensible. With over 2,000 licensed
plugins, it can monitor nearly all of
your network components across different
manufacturers, and it has many advanced
capabilities like auto discovery with
preconfigured thresholds and rules,
custom plugins. The features are just
insane. Furthermore, it creates stunning
visualizations, has dynamic dashboards
with logs and event monitoring that
really allow you to drill into all of
the details of your infrastructure. It
is really super cool. I'm personally
using the free and open source raw
edition of Czechm in my home lab which I
already did some videos on. So
definitely check them out if you like.
And if you want to use Czechm in your
company's infrastructure to monitor your
production systems, they have many
options to deploy a self-hosted solution
or use their cloud service offerings. Of
course, I will put your link to Czechm
and my tutorials in the description box
down below.
All right, guys. Let's check out the
rebranded Portainers website. Honestly,
I'm a little upset they didn't took the
chance to enable a dark mode by default,
but as you can see, they got a new logo.
They got new purple colors and a new
design. You can clearly see that they
shifted their focus a little more to the
enterprise field and the enterprise
customers with a big partnership to
Folkswagen, by the way, is a nice car,
and some other big partnerships and
brands. So you can definitely see they
follow a pattern here in the open-source
uh business community. More and more
companies are going into that direction.
They start with open-source projects
because they get a lot of funding. But
after a few years when they need to
become profitable, they start putting
some features behind pay walls and they
start uh introducing enterprise plans
and shift their focus a little into that
direction. However, my honest opinion
about this is I think it is still a fair
deal because they have the home and
student license for $150 a year, which
is similar to other offerings that you
will find. For example, unrade has a
similar license model. At the end of the
day, maintaining an application,
developing new features, hiring
engineers, and stuff like that just
costs money, so somebody needs to pay
it. And I think if they let the
enterprise companies pay the most money
and it gives us the ability with some
free community editions or home and
student licenses to get these cool
features and use it in our home lab
environment. Well, I think there's
nothing wrong about this. However, you
can really see they kind of like hide
their community edition a little though
it is still active of course. So if you
go to the main navigation, go to
resources and there you will find the
Portainer CE edition that brings us to
the git repository where we can find
instructions and you see the Portainer
community edition that is the
lightweight uh platform that is still
open source and you can still install
without any limitations in your home
lab. I personally I'm also using the
community edition and not the home and
student license. But you can really
decide for yourself if you want to use
the free community edition or you want
to pay for the home and student license
that has the same features as the
business one. So it's basically up to
you. Uh by the way if you want to
install Portainer or install the
community edition is also pretty uh
simple. You just go to their
documentation. So there you still find
the instructions how to set up a
Portainer community edition as a Docker
standalone version, Docker Swarm. Uh you
can even manage Potman though not all
features are supported there as far as I
know. But hey, at least you can do it if
you're preferring Portman over Docker.
And of course you can also install and
even manage Kubernetes. What is pretty
cool if you install Portainer, it
doesn't really matter where you install
it. If you install this as a standalone
container, Swarm, Potman or Kubernetes,
you can still manage all of these
environments from one central Portainer
instance. So I can show you when you go
to environments, you can just easily add
a new environment, then select the
environment you want to manage and then
start the wizard where you can select
between the different management
possibilities. either use the Portainer
agent which is definitely the
recommended way to manage any uh
environments but you can still connect
using the API or the docker socket
that's sometimes useful for standalone
containers or you can use the edge
agents so that is useful if you want to
manage environments where you can't
directly connect to so you deploy the
edge agent somewhere and then it
connects backwards to your Portainer's
instance otherwise the agent you will
initiate the connection from Portainer
to your environments. And here you can
find the commands in instructions. Just
copy the commands, deploy the agent on
your Docker Swarm cluster or your
Kubernetes cluster. And then add the
environment address where the Portainer
agent is accessible and it connects from
the management platform to that remote
environment. By the way, if you want to
have a tutorial about how to set up
Portainer yourself, you can refer to the
official documentation. But of course,
you can also check out my GitHub boiler
plates. So there I'm managing templates
to deploy Portainer in a standalone
Docker compos. And I'm currently also
working on some improvements for the
boiler plates to add some more
environments like Kubernetes or Docker
Swarm uh to deploy Portainer there as
well. Okay. But if you're already a
Portainer user, you will know all this
stuff. As you can see here, I'm
currently managing a Docker standalone
container, the server pro uh 7. I'm
managing a Kubernetes cluster and a
Docker Swarm cluster with that. So I'm
really managing every container
orchestration platform that I'm
deploying my home lab and I think this
is really great. Let me show you some of
the new features uh for Kubernetes
because their Portainer definitely had
some large room for improvement and they
really introduced some useful stuff
here. The most interesting one for me is
the new Helm chart integration. You can
easily now manage any Helm charts that
you have deployed on your Kubernetes
cluster. No matter if you have done that
from Portainer itself or if you're using
the Helm CLI tools or any other uh
deployment tools, you can still open
this. For example, when I go to my
assert manager Helm chart, you can see
all of the details here. Um, you can
upgrade to the latest version. You can
do roll backs and you can even inspect
some of the important stuff like the
resources like all of the objects that
this Helm chart has deployed on your
Kubernetes cluster. You can see and
inspect. You can even open them when you
click on describe and it will show you
the uh manifest of these objects. And
for troubleshooting, you can drill into
the events. You can also see the Helm
values of the chart. the custom values
that you have uh um deployed this chart
with. I think this is really incredibly
useful. Uh but you can also deselect the
userdefined ones. Then you see all of
the values that are possible and can
customize them, update the deployment
and yeah that is really great to manage
any application and then of course you
can even roll back to previous
revisions. So, Portainer really improved
a lot in Helmchart management. That
honestly made this uh platform a lot
more useful to me when managing my
Kubernetes cluster because I'm mostly
deploying everything in Helm charts. You
can also now see the ingress objects and
service objects. One thing that is a bit
unfortunate though, you only see the
Kubernetes standard ingress objects. You
don't see the traffic ingress objects.
So the ingress routes unfortunately
that's something that Portainer still
needs to improve. However, you can now
see most of the Kubernetes standard
resources like config secrets volumes
that was possible before but now you can
also see chron jobs and jobs service
accounts cluster roles and roles. So you
can really now drill into all of the
important resources in your cluster and
that is really great for Kubernetes
management. But uh Portainer also did
some great stuff when it comes to
container uh management with Docker. So
for both the swarm and the standalone, I
think these features to be fair have
been implemented in Portainer quite some
time ago. There was not so much new
stuff. However, because I just recently
became a new swarm fan or a swarm user,
um I haven't explored many of the swarm
features in Porta before because I
couldn't use them. But now since I
enabled Docker Swarm, I can now see all
of the swarm stacks. You can even see
the type here if it's swarm or compost.
What is pretty nice. What is still a bit
unfortunate in Portainer and I really
hate this that you still can't control
stacks or services that you have created
outside of Portainer. So you can see
them, you can uh inspect some of the
details, but you cannot make any edits
to this. Um that's still a limitation in
Portainer that really bothers me to be
honest. Um here you can see there is a
swarm stack that I have deployed using
Portainer. The there I have total
control. So I can uh go into all of the
details. I can edit uh all of the
details and redeploy it make updates and
so on. But that again is not possible
for any externally created stacks. And
that was really the one and only reason
why I didn't want to use Portainer a lot
in the past because sometimes I might
want to use automation tools like GitLab
CI where I'm executing some Docker CLI
commands or I'm using any other
automation tools to create my stacks and
then I can later not manage them in
Portainer. However, I think I found kind
of a solution to that because I recently
found the Portainer's Terraform provider
and Terraform is, as you might know from
watching some of my other videos, my
absolute favorite automation tool or
platform because there I'm managing many
many of my projects. And that kind of
solves the problem of when I'm using
GitLab CI/CD or other automation
pipelines, I can now use a standardized
tool to deploy my Docker compos stacks
or my Docker Swarm STS, but I still
later have total control over this. So I
think this is pretty cool and I thought
let me quickly show you how to do this
because it is really damn simple. By the
way, if you're not familiar with
Terraform, of course, I've made
tutorials about that. So definitely
check out my Terraform videos. then you
really know how to use this. But it's
actually not that difficult. You just
install the open tofu or terraform CLI
tools on your local device and then
create the providers file, initialize a
new project. Why not? Let's do this
quickly together. I think that's super
easy. So let's just uh create a new
directory. For example, let's deploy a
simple engineext uh server on my Docker
Swarm cluster using Terraform. So let's
CD into this and open this project. So
here we will always start with a
provider.tf. So this is the terraform
file where we just need to paste in the
provider main configuration. So let's
just grab that. And now in the
Portainers uh provider settings we of
course need to configure the
authentication. So we need the Portainer
endpoint. This is the main URL of the
Portainer instance. So in my case this
is Portainerome.creative.de.
Then we need the API key which we
usually don't want to store in clear
text in this terraform file. So
therefore I would create a new variable
called portainer API key which of course
has the type string and is uh sensitive.
Yes. And we can later on load this from
environment variables or when we create
a secrets do audo.tfvs
file. So these uh are variables that you
can exclude from your git repository and
will automatically be loaded into the
Terraforms uh project. So just use the
same variable name as you defined here
API key and then put your API key in
here. Of course I'm not going to show
this to you right now. By the way, if
you have trouble authenticating because
you're not using a trusted TLS
certificate, you can also set the skip
SSL verify to true. So then it's not
verifying the SSL certificate of your
Portainers instance because I'm using
traffic and trusted TLS certificates. Um
I can set this to false and then we have
everything uh to initialize the project.
So let's go back to the terminal. And uh
now it's depending on if you have
installed the terraform commands or if
you have installed open tofu which is a
fork of the previous open source version
of terraform. No because they changed to
this business available license again.
Let's not get into licensing. I've made
a separate video about open tofu. So
check that out if you want. But you can
use terraform or open tofu. It's mostly
kind of the same. So let's initialize a
new project that will now um create a
new terraform folder. download the
Portainers provider when you configured
everything correctly and once the
project has been successfully
initialized we can now start creating
our resources. So to do that let's go
back to the documentation here in the
resources you can see everything that
you can create through terraform. So you
can see there's really a lot can manage
Docker secrets for Docker Swarm. You can
manage Docker volumes with it. You can
even manage Kubernetes objects,
Kubernetes applications. So you can
install Helm charts through uh Portainer
when using the Terapform provider.
That's pretty cool. I really didn't know
that it was that capable. So I
absolutely love this. If you want to
deploy Docker standalone uh projects or
if you want to deploy uh Docker Swarm
stacks, you can use the Portainer stack
resource. So this works for both
standalone swarm or even kubernetes.
That is really nice. Here are some
examples for deploying docker standalone
stacks from a string. So you just uh
take this object and then you put your
compose file between these EOT uh
delimiters or what you can also do is
you can deploy this from a git
repository uh with automatic updates. So
that is really nice. If you change the
configuration on the Git repository, it
will pull down the latest versions and
automatically deploy this using
Portainer. But for now, I just want to
deploy a swarm stack uh using a simple
string. So here uh let's go to VS code.
Uh I'm usually creating a new file for
this uh just for easier management. So
Portainer stack.tf.
And here we can paste in the example.
And because I'm lazy, I'm just going to
let the GitHub copilot do this for me.
That's going to be a lot easier. Now,
one thing is uh something that you need
to adjust manually. That is the endpoint
ID. So, the endpoint ID is the unique
identifier of the Portainer environment
where you want to deploy this stack on.
So when we go back to the web interface
of Portainer and we go to environments
and you take a look at the address bar
you can see right after the endpoint
slash and number the 25 that is the
unique ID of the environment that we
have opened. So if we go back to VS code
just put in the number 25 and I think
that everything is all right. So yeah I
could now let AI deploy this for me but
I'm just going to show you how to do it
manually. it's probably be much more
valuable for a tutorial. So, let's first
of all run the tofu plan command. So,
that will tell me, okay, there's one
change. We want to deploy a new swarm
stack um to the environment 25. So,
let's just run the apply and confirm
this. Yes. And now it's communicating
with Portainer and it's creating the
Docker stack. Here you can see creation
was successful. If we now go back to
Portainer and select my docker swarm
cluster, we should see a new stack in
here. Here you can see this is the
engineext test one and you can also see
that we have total control over this
stack because we have deployed it using
Portainer just not the web UI but we've
used open tofu or terraform to automate
that for us and we can still go in here
we can delete the stack we can stop it
we have the editor to change anything
inside and of course you should not
really do this from the web UI if you're
using automation tools I know but I
think it is still great that you have
this uh full visibility of the services
and the stack configuration or the stack
file and you can now use any other
automation platform or any automation
tool using Terraform or open TUFU to
deploy anything or change anything on
your Portainer's configuration. That
honestly makes Portainer a lot more
attractive to me. The only problem of
course is if I for whatever reason want
to switch from Portainer to something
else. So I am probably even more into
this vendor lock in uh and dependent on
Portainer. So that's a decision you need
to make for yourself if you want to
build all your automation pipelines on
Portainer and trust this tool and use it
or if you prefer any other tools to
manage your environments. I personally
will use Portainer a lot more in the
future because of these automation
capabilities and it's making things a
lot easier for me. You can see how fast
it is to deploy anything in an automated
way. I really like this a lot. But
that's of course just my personal
opinion. Now I would like to hear yours.
So let me know in the comments what do
you think about the new Portainer after
the rebranding. Does it now have some
more interesting features? Do you like
the automation and stuff like that? I
would really love to hear from you. And
as always, thank you so much for
watching. Check out some of the other
videos on my channel. And thank you so
much for all the supporters. You guys
are really amazing. And of course, I'm
catching you all in the next video. and
take care. Bye-bye.
Ready to level up your homelab? Check out Checkmk Raw with the link on my description: https://checkmk.io/download-raw In this video, we take a deep dive into the latest features of Portainer, the popular Docker and Kubernetes management platform. We'll explore its recent rebranding, new functionalities for managing containers and clusters, and showcase how its Terraform provider can automate your deployments. Join me as we review these exciting updates and uncover some previously unexplored capabilities. References * Terraform Tutorial: https://www.youtube.com/watch?v=fEIIxZUf4co * OpenTofu Tutorial: https://www.youtube.com/watch?v=xstFUuFt5Q0 * Portainer Tutorial: https://www.youtube.com/watch?v=ljDI5jykjE8 ________________ 💜 Support me and become a Fan! → https://christianlempa.de/patreon → https://www.youtube.com/channel/UCZNhwA1B5YqiY1nLzmM0ZRg/join 💬 Join our Community! → https://christianlempa.de/discord 👉 Follow me everywhere → https://christianlempa.de ________________ Read my Tech Documentation https://christianlempa.de/docs My Gear and Equipment https://christianlempa.de/kit ________________ Timestamps: 00:00 Introduction 02:24 My opinion on Portainer’s rebranding 04:41 Install Portainer 06:53 Kubernetes Improvements 09:30 Docker Swarm Management 11:10 Portainer Terraform Provider 18:20 Final thoughts ________________ Links can include affiliate links.