PyratLabs / ansible-role-k3s

Ansible role for installing k3s as either a standalone server or HA cluster.
BSD 3-Clause "New" or "Revised" License
627 stars 135 forks source link

How to depoy Rancher with nginx ingress controller?? #181

Closed yeranosyanvahan closed 2 years ago

yeranosyanvahan commented 2 years ago

Hello as title says I want to deploy rancher. Here is my directory structure

.
├── inventory.yaml
├── main.yaml
├── master
│   └── ingress.yaml
└── pods
    └── manifest.yaml

pods/manifest.yaml file

apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
  name: cert-manager
  namespace: cert-manager
spec:
  chart: jetstack/cert-manager
  repo: https://charts.jetstack.io
  targetNamespace: cert-manager
  version: v.1.5.1
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
  name: rancher
  namespace: cattle-system
spec:
  chart: rancher-stable/rancher
  repo: https://releases.rancher.com/server-charts/stable
  targetNamespace: cattle-system
  set:apiVersion: helm.cattle.io/v1

and master/ingress.yaml file

kind: HelmChart
metadata:
  name: ingress-nginx
  namespace: ingress-nginx
spec:
  chart: ingress-nginx
  repo: https://kubernetes.github.io/ingress-nginx
  targetNamespace: ingress-nginx

and the playbook is main.yaml

---

- name: Building k3s cluster
  hosts: k3s_cluster
  vars:
    k3s_become: true
    k3s_server_pod_manifests_urls:
      - url: https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml
        filename: cert-manager.yaml
# how to deploy the rancher from pods/manifest.yaml
# how to replace ingress controller ???
  roles:
    - role: xanmanning.k3s
yeranosyanvahan commented 2 years ago

sorry, it is a duplicate, I opened an issue 2 times