istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/httpbin/httpbin-nodeport.yaml (about) 1 # Copyright Istio Authors 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 ################################################################################################## 16 # httpbin service 17 ################################################################################################## 18 apiVersion: v1 19 kind: Service 20 metadata: 21 name: httpbin 22 labels: 23 app: httpbin 24 service: httpbin 25 spec: 26 type: NodePort 27 ports: 28 - name: http 29 port: 8000 30 targetPort: 8080 31 selector: 32 app: httpbin 33 --- 34 apiVersion: apps/v1 35 kind: Deployment 36 metadata: 37 name: httpbin 38 spec: 39 replicas: 1 40 selector: 41 matchLabels: 42 app: httpbin 43 version: v1 44 template: 45 metadata: 46 labels: 47 app: httpbin 48 version: v1 49 spec: 50 containers: 51 - image: docker.io/kong/httpbin 52 imagePullPolicy: IfNotPresent 53 name: httpbin 54 # Same as found in Dockerfile's CMD but using an unprivileged port 55 command: 56 - gunicorn 57 - -b 58 - 0.0.0.0:8080 59 - httpbin:app 60 - -k 61 - gevent 62 env: 63 # Tells pipenv to use a writable directory instead of $HOME 64 - name: WORKON_HOME 65 value: /tmp 66 ports: 67 - containerPort: 8080