jupyterlab 大使配置

ambassador configuration for jupyterlab

我正在尝试用 ambassador 替换 nginx 作为代理,这是 envoyproxy 在 kubernetes 上的实现。我完全按照 here

中所示进行操作

但似乎没有任何效果,有人可以帮助进行适当的配置吗?

我有办法

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: deploy-lab
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: lab
    spec:
      containers:
      - name: ipython-container
        image: <your image>
        imagePullPolicy: "Always"
        ports:
        - containerPort: 8888
        env <if you have one>:
         - name: BASEURL
           value: jupyter
         - name: PASSWORD
           value: jupyter

---
kind: Service
apiVersion: v1
metadata:
  labels:
    app: lab
  name: jupyter
  annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v0
      kind:  Mapping
      name:  jupyter_mapping
      service: http://jupyter.<your namespace>.svc.cluster.local:8889
      use_websocket: true
      prefix: /
      rewrite: /
      host_rewrite: http://jupyter.<your namespace>.svc.cluster.local
spec:
  type: ClusterIP
  selector:
    app: lab
  ports:
  - name: jupyter
    protocol: TCP
    port: 8889
    targetPort: 8888