官方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

  1. mv linux-amd64/helm /usr/bin/

image.png

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

image.png

  1. helm repo list
  2. helm repo update

image.png

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

image.png

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

image.png

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

image.png

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

image.png

编写voyager ingress

  1. cat > voyager-ingress.yaml << EOF
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: nginx
  6. spec:
  7. replicas: 3
  8. selector:
  9. matchLabels:
  10. app: nginx
  11. template:
  12. metadata:
  13. labels:
  14. app: nginx
  15. spec:
  16. containers:
  17. - image: nginx
  18. name: nginx
  19. ports:
  20. - containerPort: 80
  21. ---
  22. apiVersion: v1
  23. kind: Service
  24. metadata:
  25. name: nginx
  26. spec:
  27. selector:
  28. app: nginx
  29. ports:
  30. - protocol: TCP
  31. port: 80
  32. targetPort: 80
  33. ---
  34. apiVersion: voyager.appscode.com/v1beta1
  35. kind: Ingress
  36. metadata:
  37. annotations:
  38. ingress.appscode.com/replicas: "1"
  39. ingress.appscode.com/type: NodePort
  40. kubernetes.io/ingress.class: voyager
  41. name: voyager-ingress
  42. namespace: default
  43. spec:
  44. rules:
  45. - host: voyager.nginx.com
  46. http:
  47. nodePort: "32680"
  48. paths:
  49. - backend:
  50. serviceName: nginx
  51. servicePort: 80
  52. path: /
  53. port: "80"
  54. EOF

image.png

查看vogaer ingress

  1. kubectl get ingresses.voyager.appscode.com

image.png

image.png