虚拟化容器,大数据,DBA,中间件,监控。

Install and use rancher helm-controller

22 11月
作者:admin|分类:容器虚拟化

Install and use rancher helm-controller

K3S comes with a Helm operator called Helm Controller. Helm Controller defines a new HelmChart custom resource definition, or CRD, for managing Helm charts.

Parst of the K3S series

Install helm-controller K8S

Thanks to Francisco Bobadilla who created RBAC for Rancher’s helm-controller we can deploy this solution to a stander K8S cluster.

kubectl apply -f https://raw.githubusercontent.com/iotops/helm-controller/master/manifests/deploy-namespaced.yaml
kubectl api-resources --api-group=helm.cattle.io
NAME         SHORTNAMES   APIGROUP         NAMESPACED   KIND
helmcharts                helm.cattle.io   true         HelmChart

Deploy Nginx ingress Controller

nano ginx-ingress.yaml
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
  name: nginx-ingress
  namespace: helm-controller
spec:
  chart: stable/nginx-ingress
  targetNamespace: nginx-ingress
  valuesContent: |-
    rbac:
      create: "true"
    controller:

      kind: DaemonSet
      hostNetwork: "true"
      daemonset:
        useHostPort: "true"
      service:
        type: "NodePort"

On a K3S cluster the namespace: must be kube-system because k3S deploys the helm-controller to that namespace.

Auto-Deploying Manifests

Any file found in /var/lib/rancher/k3s/server/manifests will automatically be deployed to Kubernetes in a manner similar to kubectl apply.

cp nginx-ingress.yaml /var/lib/rancher/k3s/server/manifests/
浏览478 评论0
返回
目录
返回
首页
Install K3S with k3sup and Cilium Install K3S with CRI-O and kadalu