kubernetes

helm安装kong网关

2020-08-12  本文已影响0人  lodestar

安装kong网关

helm install kong-index kong/kong  -f values.yaml

value.yaml

image:
  repository: "kong"
  tag: "2.1.0-ubuntu"
securityContext:
  runAsUser: 0
admin:
  enabled: true
  http:
    enabled: true
    servicePort: 8001
    containerPort: 8001
  tls:
    enabled: false
    servicePort: 8444
    containerPort: 8444
    parameters:
    - http2
proxy:
  # Enable creating a Kubernetes service for the proxy
  enabled: true
  type: LoadBalancer
  # If you want to specify annotations for the proxy service, uncomment the following
  # line, add additional or adjust as needed, and remove the curly braces after 'annotations:'.
  annotations:
    service.beta.kubernetes.io/alicloud-loadbalancer-address-type: "internet"
    service.beta.kubernetes.io/alicloud-loadbalancer-protocol-port: "https:443,http:80"
    service.beta.kubernetes.io/alicloud-loadbalancer-force-override-listeners: "true"
    service.beta.kubernetes.io/alicloud-loadbalancer-cert-id: "xxxxx"
  #  service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
  http:
    # Enable plaintext HTTP listen for the proxy
    enabled: true
    servicePort: 80
    containerPort: 8000
    # Set a nodePort which is available if service type is NodePort
    # nodePort: 32080
    # Additional listen parameters, e.g. "reuseport", "backlog=16384"
    parameters: []
  tls:
    # Enable HTTPS listen for the proxy
    enabled: true
    servicePort: 443
    containerPort: 8443
    # Set a target port for the TLS port in proxy service, useful when using TLS
    # termination on an ELB.
    # overrideServiceTargetPort: 8000
    # Set a nodePort which is available if service type is NodePort
    # nodePort: 32443
    # Additional listen parameters, e.g. "reuseport", "backlog=16384"
    parameters:
    - http2
plugins:
  configMaps:
  - name: kong-plugin-gray-cm
    pluginName: gray
resources:
   limits:
     cpu: 250m
     memory: 0.5Gi
ingressController:
  enabled: true
  ingressClass: kong
  installCRDs: false

使用了一个自定义的插件kong-plugin-gray-cm,kong plugin所在的代码在configMap配置项中。
更详细的配置参考:
https://github.com/Kong/charts/blob/main/charts/kong/values.yaml

查看kong的插件等,确认是否生效
curl 172.19.7.240:8001/routers
curl 172.19.7.240:8001/plugins

上一篇下一篇

猜你喜欢

热点阅读