From a79a01e2cb7b318e694abf76dc6cc6aab87c1746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Rodr=C3=ADguez?= Date: Fri, 25 Oct 2024 00:05:50 +0200 Subject: [PATCH] modificados ficheros --- src/config.ts | 2 +- .../posts/2024-10-24_k3s_ansible/index.md | 59 +++++++++++++++++++ src/content/spec/about.md | 7 +-- 3 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 src/content/posts/2024-10-24_k3s_ansible/index.md diff --git a/src/config.ts b/src/config.ts index d189881..fe6653e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -8,7 +8,7 @@ import { LinkPreset } from './types/config' export const siteConfig: SiteConfig = { title: 'RobertOps 💻', - subtitle: 'Demo Site', + subtitle: '', lang: 'es', // 'en', 'zh_CN', 'zh_TW', 'ja', 'ko' themeColor: { hue: 250, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345 diff --git a/src/content/posts/2024-10-24_k3s_ansible/index.md b/src/content/posts/2024-10-24_k3s_ansible/index.md new file mode 100644 index 0000000..53e976e --- /dev/null +++ b/src/content/posts/2024-10-24_k3s_ansible/index.md @@ -0,0 +1,59 @@ +--- +title: Instalación de k3s utilizando Ansible +published: 2024-10-24 +description: '' +image: '' +tags: [] +category: '' +draft: false +lang: '' +--- +## Preparación del escenario + +Para crear el escenario se va a usar **Vagrant**, utilizando el siguiente `Vagrantfile`: +```ruby +Vagrant.configure("2") do |config| + config.vm.box = "debian/bookworm64" + config.vm.box_check_update = false + config.vm.synced_folder ".", "/vagrant", disabled: true + config.vm.provider "libvirt" do |v| + v.memory = 2048 + v.cpus = 3 + v.driver = "qemu" + end + config.vm.define "master" do |master| + master.vm.hostname = "master" + master.vm.network "private_network", + :libvirt__network_name => "k3s-vagrant", + :ip => "10.10.10.10", + :libvirt__dhcp_enabled => false, + :libvirt__forward_mode => "veryisolated" + end + config.vm.define "nodo1" do |nodo1| + nodo1.vm.hostname = "nodo1" + nodo1.vm.network "private_network", + :libvirt__network_name => "k3s-vagrant", + :ip => "10.10.10.20", + :libvirt__dhcp_enabled => false, + :libvirt__forward_mode => "veryisolated" + end + config.vm.define "nodo2" do |nodo2| + nodo2.vm.hostname = "nodo2" + nodo2.vm.network "private_network", + :libvirt__network_name => "k3s-vagrant", + :ip => "10.10.10.30", + :libvirt__dhcp_enabled => false, + :libvirt__forward_mode => "veryisolated" + end + end +``` + + +master +```shell +export KUBECONFIG=~/.kube/config +mkdir ~/.kube 2> /dev/null +chmod 600 "$KUBECONFIG" +sudo k3s kubectl config view --raw > "$KUBECONFIG" +``` + diff --git a/src/content/spec/about.md b/src/content/spec/about.md index 37477df..540cab8 100644 --- a/src/content/spec/about.md +++ b/src/content/spec/about.md @@ -1,9 +1,8 @@ -# About +# Sobre mí This is the demo site for [Fuwari](https://github.com/saicaca/fuwari). ::github{repo="robertorodriguez98/blog-robertops-v2"} -> ### Sources of images used in this site +> ### Fuentes de las imágenes usadas en el sitio > - [Unsplash](https://unsplash.com/) -> - [星と少女](https://www.pixiv.net/artworks/108916539) by [Stella](https://www.pixiv.net/users/93273965) -> - [Rabbit - v1.4 Showcase](https://civitai.com/posts/586908) by [Rabbit_YourMajesty](https://civitai.com/user/Rabbit_YourMajesty) \ No newline at end of file +> - [Imagen de perfil](https://picrew.me/en/image_maker/35494)