官方GitHub:https://github.com/appscode/voyager
官方网站:https://appscode.com/products/voyager/v12.0.0-rc.1/setup/install/

安装voyager

官方推荐使用helm3来安装
image.png

Helm是Kubernetes的软件包(或资源)管理工具,最近发布了Helm的3.0版本,提供了一些新特性,在使用上相比之前的版本更加简单、方便,比如:

  • 移除Tiller,安装chart前无需执行init命令(包括安装tiller和初始化本地仓库),相对地也不再需要与Tiller交互,而是直接通过ApiServer进行安装操作
  • 支持使用JSONSchema校验values
  • 兼容v2版本

helm的官方GitHub:https://github.com/helm/helm
下载helm3二进制文件
image.png

  1. tar xvf helm-v3.1.2-linux-amd64.tar

image.png

mv linux-amd64/helm   /usr/bin/

image.png

helm repo add appscode https://charts.appscode.com/stable/

image.png

helm repo list
helm repo update

image.png

helm search repo appscode/voyager --version v12.0.0-rc.1

image.png

 helm pull  appscode/voyager --version v12.0.0-rc.1

image.png

 helm install voyager-operator appscode/voyager --version v12.0.0-rc.1   --namespace kube-system    --set cloudProvider=$provider

image.png

kubectl --namespace=kube-system get pods | grep voyager

image.png

编写voyager ingress

cat > voyager-ingress.yaml << EOF
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx
        name: nginx
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: nginx
spec:
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
---
apiVersion: voyager.appscode.com/v1beta1
kind: Ingress
metadata:
  annotations:
    ingress.appscode.com/replicas: "1"
    ingress.appscode.com/type: NodePort
    kubernetes.io/ingress.class: voyager
  name: voyager-ingress
  namespace: default
spec:
  rules:
  - host: voyager.nginx.com
    http:
      nodePort: "32680"
      paths:
      - backend:
          serviceName: nginx
          servicePort: 80
        path: /
      port: "80"
EOF

image.png

查看vogaer ingress

kubectl get ingresses.voyager.appscode.com

image.png

image.png