Giter VIP home page Giter VIP logo

k8s-home's Introduction

k8s-home

prepare rasperry-pis

install ubuntu 20.04 lts on your pi's login and change the default password 'ubuntu' to something you like copy your ssh-key to the machines:

ssh-copy-id ubuntu@pi-0
ssh-copy-id ubuntu@pi-1
ssh-copy-id ubuntu@pi-2
ssh-copy-id ubuntu@pi-3

Login and change hostnames:

sudo hostnamectl set-hostname pi-0
sudo hostnamectl set-hostname pi-1
sudo hostnamectl set-hostname pi-2
sudo hostnamectl set-hostname pi-3

setup k3s-cluster

Setting up the cluster

edit the host-config in setup/hosts.yaml

cd setup
ansible-playbook install.yaml
ansible-playbook setup-k3s.yaml

get kubeconfig from the cluster. It is located in file /etc/rancher/k3s/k3s.yaml. Place it in your homefolder: $HOME/.kube/config and edit the url of my the master (192.168.0.40 in my case):

server: https://192.168.0.40:6443

check the new cluster

kubectl cluster-info

Import Cluster to rancher

login to rancher, create new cluster (existing) and execute the commands provided.

kubectl apply -f https://rancher.rwcloud.org/v3/import/xxxxx.yaml

Setting up direnv

Install direnv and setup some environment-variables in ./.envrc

add to .bashrc if using bash:

eval "$(direnv hook bash)"

add to .zshrc if using zsh:

eval "$(direnv hook zsh)"

Create a .envrc in project folder (and never add this file to your repo!)

export GITHUB_USER=
# token, that can create repositories (check all permissions under repo)
export GITHUB_TOKEN=

export BOOTSTRAP_GITHUB_REPOSITORY=https://github.com/rowa78/k8s-home

# 1Password-Token
export OP_TOKEN=

allow this file

direnv allow .envrc

Now your environment-variables are set.

create initial config

We use the 1Password-Operator to deliver secrets to out cluster. It need's an secret ' with the 1password-credentials.json in it. create an integration in 1password and save 1password-credentials.json and the token

kubectl create namespace 1password
kubectl -n 1password create secret generic onepassword-token --from-literal=token=$OP_TOKEN

Install the 1password operator

helm repo add 1password https://1password.github.io/connect-helm-charts
helm -n 1password upgrade -i connect 1password/connect --version 1.5.0 --set-file connect.credentials=/mnt/c/tmp/1password-credentials.json --values 1password-operator/values.yaml
#kubectl apply -f 1password-operator/clusterrolebinding.yaml

install flux to cluster

install flux

kubectl create namespace flux-system
flux bootstrap github --owner=rowa78 --repository=k8s-home --path=./clusters/pi

manual changed

i need to resolve dns-entries in my lan. So i changed the dns-server in configmap for CoreDNS:

kc -n kube-system edit configmap coredns
# change forward-line
# forward to my pi-hole
forward . 192.168.0.7

perhaps there is a better solution. Will look for that later.

k8s-home's People

Contributors

rowa78 avatar renovate-bot avatar renovate[bot] avatar

Stargazers

Mark avatar

Watchers

 avatar

k8s-home's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json5
Error type: Invalid JSON5 (parsing failed)
Message: JSON5.parse error: JSON5: invalid character '\"' at 106:7

Renovate Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository.

  • WARN: No docker auth found - returning

โš  Dependency Lookup Warnings โš 

  • Renovate failed to look up the following dependencies: Failed to look up helm dependency kured, Failed to look up helm dependency longhorn-crd, Failed to look up helm dependency rancher-monitoring-crd.

Files affected: deployments/core/kured/kured-helmrelease.yaml, deployments/crds/longhorn-crds/helmrelease.yaml, deployments/crds/rancher-monitoring-crds/helmrelease.yaml


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
setup/roles/xanmanning.k3s/.devcontainer/Dockerfile
  • ubuntu focal
setup/roles/xanmanning.k3s/molecule/default/Dockerfile.j2
setup/roles/xanmanning.k3s/molecule/highavailabilitydb/Dockerfile.j2
flux
clusters/pi/flux-system/gotk-components.yaml
  • fluxcd/flux2 v0.36.0
helm-values
deployments/apps/chartmuseum/chartmuseum.yaml
  • ghcr.io/helm/chartmuseum v0.15.0
deployments/apps/hass/hass-helm-release.yaml
  • homeassistant/home-assistant 2022.11.1
  • codercom/code-server 4.8.2
  • docker.io/bitnami/postgresql 14.5.0
deployments/apps/hass/node-red-helm-release.yaml
  • nodered/node-red 2.2.3-12-minimal
deployments/apps/jenkins/jenkins-instance.yaml
  • jenkins/jenkins 2.361.3-lts-alpine
deployments/apps/jenkins/jenkins.yaml
deployments/apps/jenkins/values.yaml
  • jenkins/jenkins 2.361.3-lts
  • virtuslab/jenkins-operator-backup-pvc v0.1.1
  • virtuslab/jenkins-operator v0.7.1
deployments/apps/minecraft/minecraft-1-caro-sofia.yaml
deployments/apps/minecraft/minecraft-2-caro-ronny.yaml
deployments/apps/minecraft/minecraft-3-caro-maxi.yaml
deployments/apps/nexus/nexus.yaml
  • sonatype/nexus3 3.42.0
deployments/apps/seat/mariadb/deployment.yaml
  • mariadb 10.8.2-focal
deployments/apps/seat/redis/deployment.yaml
  • redis 7-alpine
deployments/apps/seat/seat/deployment.yaml
  • eveseat/seat 4.2.17
  • eveseat/seat 4.2.17
  • eveseat/seat 4.2.17
deployments/core/authentik/helmrelease.yaml
  • goauthentik.io/server 2021.12.5
  • maxmindinc/geoipupdate v4.10
  • docker.io/bitnami/postgresql 14.5.0
deployments/core/authentik/values.yaml
  • goauthentik.io/server 2021.12.5
  • maxmindinc/geoipupdate v4.10
deployments/core/botkube/botkube-helmrelease.yaml
  • docker.io/raspbernetes/botkube v0.12.4
deployments/core/kured/kured-helmrelease.yaml
  • raspbernetes/kured 1.10.2
deployments/core/metallb/helm-release.yaml
  • metallb/controller v0.12.1
  • metallb/speaker v0.12.1
deployments/core/monitoring/thanos/thanos.yaml
  • raspbernetes/thanos v0.23.1
deployments/core/networking/blocky/blocky.yaml
  • ghcr.io/0xerr0r/blocky v0.19
deployments/core/networking/cloudflare-ddns/deployment.yaml
deployments/core/networking/cloudflare-ddns/deployment_domain2.yaml
deployments/core/networking/cloudflare-ddns/deployment_domain3.yaml
deployments/core/networking/traefik/helmrelease.yaml
  • ghcr.io/k8s-at-home/traefik v2.8.0
deployments/core/nfs-subdir-external-provisioner/helm-release.yaml
  • k8s.gcr.io/sig-storage/nfs-subdir-external-provisioner v4.0.2
deployments/core/node-feature-discovery/helm-release.yaml
  • raspbernetes/node-feature-discovery v0.11.3
deployments/core/oauth2-proxy/helmrelease.yaml
  • quay.io/oauth2-proxy/oauth2-proxy v7.4.0-armv6
deployments/core/velero/velero.yaml
  • velero/velero v1.9.2
  • velero/velero-plugin-for-aws v1.5.1
deployments/core/wildcard-certificate/upload-job.yaml
  • neilpang/acme.sh 3.0.4
deployments/infrastructure/oauth2-proxy/oauth2-proxy.yaml
  • quay.io/oauth2-proxy/oauth2-proxy v7.4.0-armv6
setup/manifests/kube-vip/kube-vip-daemonset.yaml
  • plndr/kube-vip v0.5.5
kubernetes
1password-operator/clusterrolebinding.yaml
  • ClusterRoleBinding rbac.authorization.k8s.io/v1
deployments/apps/hass/influxdb-ingress.yaml
  • Ingress networking.k8s.io/v1
deployments/apps/jenkins/ingress.yaml
  • Ingress networking.k8s.io/v1
deployments/apps/jenkins/jenkins-instance.yaml
  • jenkins/jenkins 2.361.3-lts-alpine
deployments/apps/jenkins/jenkins.yaml
deployments/apps/minecraft/minecraft-1-caro-sofia.yaml
deployments/apps/minecraft/minecraft-2-caro-ronny.yaml
deployments/apps/minecraft/minecraft-3-caro-maxi.yaml
deployments/apps/seat/mariadb/deployment.yaml
  • mariadb 10.8.2-focal
  • Deployment apps/v1
deployments/apps/seat/redis/deployment.yaml
  • redis 7-alpine
  • Deployment apps/v1
deployments/apps/seat/seat/deployment.yaml
  • eveseat/seat 4.2.17
  • eveseat/seat 4.2.17
  • eveseat/seat 4.2.17
  • Deployment apps/v1
deployments/apps/seat/seat/ingress.yaml
  • Ingress networking.k8s.io/v1
deployments/core/authentik/helmrelease.yaml
  • maxmindinc/geoipupdate v4.10
deployments/core/external-services/diskstation.yaml
  • Ingress networking.k8s.io/v1
  • Ingress networking.k8s.io/v1
  • Ingress networking.k8s.io/v1
  • Ingress networking.k8s.io/v1
  • Ingress networking.k8s.io/v1
  • Ingress networking.k8s.io/v1
deployments/core/networking/cloudflare-ddns/deployment.yaml
  • Deployment apps/v1
deployments/core/networking/cloudflare-ddns/deployment_domain2.yaml
  • Deployment apps/v1
deployments/core/networking/cloudflare-ddns/deployment_domain3.yaml
  • Deployment apps/v1
deployments/core/velero/velero.yaml
  • velero/velero-plugin-for-aws v1.5.1
deployments/core/wildcard-certificate/upload-job.yaml
  • neilpang/acme.sh 3.0.4
  • CronJob batch/v1
setup/manifests/kube-vip/kube-vip-daemonset.yaml
  • plndr/kube-vip v0.5.5
  • DaemonSet apps/v1
pip_requirements
setup/roles/xanmanning.k3s/molecule/requirements.txt
  • molecule >=3.2
  • docker >=4.3.1
  • yamllint >=1.25.0
  • ansible-lint >=4.3.5
setup/roles/xanmanning.k3s/requirements.txt
  • ansible >=2.10.7
regex
deployments/apps/hass/hass-helm-release.yaml
  • home-assistant 13.4.2
deployments/apps/hass/mosquitto-helm-release.yaml
  • mosquitto 4.8.2
deployments/apps/hass/node-red-helm-release.yaml
  • node-red 10.3.2
deployments/apps/hass/zigbee2mqtt-helm-release.yaml
  • zigbee2mqtt 9.4.2
deployments/apps/minecraft/minecraft-1-caro-sofia.yaml
  • minecraft 4.4.0
deployments/apps/minecraft/minecraft-2-caro-ronny.yaml
  • minecraft 4.4.0
deployments/apps/minecraft/minecraft-3-caro-maxi.yaml
  • minecraft 4.4.0
deployments/core/authentik/helmrelease.yaml
  • authentik 2022.10.0
deployments/core/botkube/botkube-helmrelease.yaml
  • botkube v0.12.4
deployments/core/cert-manager/helm-release.yaml
  • cert-manager v1.10.0
deployments/core/ingress-nginx/helm-release.yaml
  • ingress-nginx 4.3.0
deployments/core/kured/kured-helmrelease.yaml
  • kured 2.9.1
deployments/core/metallb/helm-release.yaml
  • metallb 3.0.12
deployments/core/monitoring/grafana/helmrelease.yaml
  • grafana 6.43.3
deployments/core/monitoring/kube-prometheus-stack/helm-release.yaml
  • kube-prometheus-stack 35.6.2
deployments/core/monitoring/loki/helmrelease.yaml
  • loki-stack 2.8.4
deployments/core/monitoring/thanos/thanos.yaml
  • thanos 10.5.5
deployments/core/networking/blocky/blocky.yaml
  • blocky 10.5.2
deployments/core/networking/external-dns/helmrelease.yaml
  • external-dns 6.11.3
deployments/core/networking/traefik/helmrelease.yaml
  • traefik 10.33.0
deployments/core/nfs-subdir-external-provisioner/helm-release.yaml
  • nfs-subdir-external-provisioner 4.0.17
deployments/core/node-feature-discovery/helm-release.yaml
  • node-feature-discovery 2.1.3
deployments/core/oauth2-proxy/helmrelease.yaml
  • oauth2-proxy 6.3.0
deployments/core/rancher/helm-release.yaml
  • rancher 2.6.9
deployments/core/velero/velero.yaml
  • velero 2.32.1
deployments/crds/longhorn-crds/helmrelease.yaml
  • longhorn-crd 100.1.2+up1.2.4
deployments/crds/rancher-monitoring-crds/helmrelease.yaml
  • rancher-monitoring-crd 100.1.2+up19.0.3
deployments/infrastructure/oauth2-proxy/oauth2-proxy.yaml
  • oauth2-proxy 6.3.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.