Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

GitOps Deployment using Rancher's Fleet!

Автор: Ben Spilker

Загружено: 2025-05-26

Просмотров: 458

Описание:

github.com/benspilker/rancher-fleet

If you’re just joining, you’ve landed at an exciting point. In the past 7 videos, we’ve covered a lot, following the scripts from my `proxmox-k3s` GitHub repo. This time, we’re switching to a new repo—**Rancher Fleet**—to explore GitOps.

Quick Recap:
Here’s what we’ve done so far:

Set up a nested Proxmox host with a custom user and SSH key.
Created 9 Ubuntu VMs from a template.
Deployed a K3s cluster across 8 of those VMs.
Set up a UI for managing K3s.
Deployed Nextcloud—first without, then with persistent storage—and hooked it up to a MariaDB database.
In the last video, we stress-tested system dependencies and then reset the setup: Proxmox at 8 cores, Worker VMs at 4, and the rest at 2.

What Is GitOps?

GitOps automates infrastructure changes based on your Git repository. Whenever you push code to GitHub, your environment updates itself to match.

This is a form of Continuous Delivery (CD), a DevOps practice where CI/CD pipelines automatically apply changes.

To follow along, you’ll need:

Git installed on your system
A GitHub account

Create the GitHub Repo and Token:

We’ll start by creating a private GitHub repo (you can make it public later).

Next, go to GitHub , Profile , Settings , Developer Settings. Under "Personal Access Tokens," generate a *fine-grained token* with access to your new repo. Set an expiration date and copy the token—this is the only time you’ll see it.

Connect GitHub to Rancher Using Fleet:

In Rancher, we’ll use **Fleet**, the built-in continuous delivery tool, inspired by Jim’s Garage’s tutorial
   • GitOps Made Easy with Fleet. Kubernetes At...  

A note: GitHub uses `main` as the default branch, while Fleet uses `master`. Make sure to change that setting.

In Rancher:

1. Click the sailboat icon (Fleet).
2. Choose **Fleet Local**—this is our actual cluster.
3. Click *Get Started* , **Git Repos**.
4. Enter the name of your GitHub repo.
5. Under authentication, choose **HTTP Basic Auth Secret**.
Username: your GitHub email
Password: the access token
6. Paste in your repo’s URL and change the branch to `main`.
7. Click *Next* and leave the defaults, then click **Create**.

You’ll get an error about the repo being empty. This is expected and means Fleet is set up properly.

Let’s test the GitOps connection by adding a `nextcloud2` namespace.
kubectl get namespaces

Copy a small YAML file from my existing repo, push it, and then:
kubectl get namespaces

You should see the new namespace appear—Fleet picked up the Git change and applied it. Success!

DNS Setup for a Second Instance:
Before deploying another Nextcloud instance, let’s update DNS.

You can reuse the IP by pointing multiple subdomains to it. Traefik and Kubernetes route things accordingly.

Use the DNS script from Step 5A of my repo, but add a `2` at the end of your domain.

github.com/benspilker/proxmox-k3s/blob/main/5-6_Install-Nextcloud/5A-domainname-dns.sh

Run the updated script for your new subdomain.

Deploying via Fleet:

Copy over files 1–7 from my Fleet repo. They’ll deploy 16 resources in order, using the filename numbers.

Note: This GitOps method is different from the previous shell-script-based approach. Secrets and credentials must be defined within Kubernetes YAML, not Bash variables.

1. *Namespace & RBAC* – Grants permission to manage secrets.
2. *Secret Generator* – Generates and base64-encodes a strong password.
3. *MariaDB Deploy* – Sets up MariaDB with persistent storage, using the secret.
4. *Database Init* – Creates the Nextcloud DB and user.
5. *Nextcloud Deploy* – Deploys Nextcloud and uses a sidecar container to edit `config.php` to include HTTPS and the correct domain.
6. *Self-signed Cert* – Generates a certificate.
7. *Ingress Resource* – Exposes Nextcloud via HTTPS.

After pushing the files, Fleet should start deploying. It might pause at 15/16—don’t worry.

Check deployment status:

kubectl get pods -n nextcloud2

Grab the pod name:

POD_NAME=$(kubectl get pods -n nextcloud2 --no-headers | grep -v maria | awk '{print $1}' | head -n 1)

Then inspect the config:

kubectl exec -it $POD_NAME -n nextcloud2 -- /bin/sh -c 'cat /var/www/html/config/config.php'

Sometimes, the config resets after pod restart. To handle that, the sidecar waits 3 minutes, then runs a loop to ensure the config is set. It may take up to 5 minutes for the changes to fully apply.

If you visit the site too early, you’ll see a "trusted domain" error—but just wait.

Final Steps Once it’s ready, go to:

nextcloud.yourexampledomain2.com
Default login: `admin` / `changeme`.

The first login may need a refresh or new tab. After that, you're good!

Done!

And there you have it. A working Nextcloud instance with persistent storage, using a MySQL database deployed in a Gitops method.

Thanks for watching this series. I hope you learned a lot. I sure did. Especially making this presentation. Thanks again and keep learning!

GitOps Deployment using Rancher's Fleet!

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Чем ОПАСЕН МАХ? Разбор приложения специалистом по кибер безопасности

Чем ОПАСЕН МАХ? Разбор приложения специалистом по кибер безопасности

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Kubernetes — Простым Языком на Понятном Примере

Kubernetes — Простым Языком на Понятном Примере

⚡️Спецслужбы Запада зашли в Москву || Армия РФ отошла?

⚡️Спецслужбы Запада зашли в Москву || Армия РФ отошла?

Вам нужно изучить Docker ПРЯМО СЕЙЧАС!! // Docker-контейнеры 101

Вам нужно изучить Docker ПРЯМО СЕЙЧАС!! // Docker-контейнеры 101

Свой VPN для обхода блокировок без посредников и без знаний IT

Свой VPN для обхода блокировок без посредников и без знаний IT

Proxmox Datacenter Manager — центр управления виртуальной инфраструктурой

Proxmox Datacenter Manager — центр управления виртуальной инфраструктурой

How To Use Git In VS Code Like A Pro!

How To Use Git In VS Code Like A Pro!

Kubnernetes K3s, Proxmox Setup, VM Prep Guide

Kubnernetes K3s, Proxmox Setup, VM Prep Guide

Структура файлов и каталогов в Linux

Структура файлов и каталогов в Linux

Using Rancher Fleet and GitHub Actions for GitOps Releases

Using Rancher Fleet and GitHub Actions for GitOps Releases

ArgoCD Tutorial for Beginners | GitOps CD for Kubernetes

ArgoCD Tutorial for Beginners | GitOps CD for Kubernetes

КАК УСТРОЕН TCP/IP?

КАК УСТРОЕН TCP/IP?

Изучите Microsoft Active Directory (ADDS) за 30 минут

Изучите Microsoft Active Directory (ADDS) за 30 минут

💥7 МИНУТ НАЗАД! Серия убийств ТОП ГЕНЕРАЛОВ РФ! Спецслужбы БЕССИЛЬНЫ, у Z-ников ИСТЕРИКА - НАКИ

💥7 МИНУТ НАЗАД! Серия убийств ТОП ГЕНЕРАЛОВ РФ! Спецслужбы БЕССИЛЬНЫ, у Z-ников ИСТЕРИКА - НАКИ

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Docker за 20 минут

Docker за 20 минут

Challenges & Fixes, Deploying Nextcloud on K3s With Fail-Safes

Challenges & Fixes, Deploying Nextcloud on K3s With Fail-Safes

Важное заявление Тертеля: о Лукашенко и не только / Масштабные аресты по всей Беларуси

Важное заявление Тертеля: о Лукашенко и не только / Масштабные аресты по всей Беларуси

Андрей Девятов. Меньше знаешь - крепче спишь!

Андрей Девятов. Меньше знаешь - крепче спишь!

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]