mirror of https://github.com/istio/istio.io.git
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
# Copyright 2017 Istio Authors
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
##################################################################################################
|
|
# NGINX service
|
|
##################################################################################################
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
labels:
|
|
app: nginx
|
|
name: nginx
|
|
spec:
|
|
ports:
|
|
- port: 9080
|
|
protocol: TCP
|
|
targetPort: 9080
|
|
selector:
|
|
app: nginx
|
|
type: NodePort
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app: nginx
|
|
name: nginx
|
|
namespace: default
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: nginx
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nginx
|
|
spec:
|
|
containers:
|
|
- image: docker.io/nginx
|
|
imagePullPolicy: IfNotPresent
|
|
name: nginx
|
|
resources: {}
|
|
lifecycle:
|
|
postStart:
|
|
exec:
|
|
command: ["/bin/bash", "-c", "echo 'server { listen 9080; location / { proxy_pass http://httpbin:8000; proxy_http_version 1.1; } }' > /etc/nginx/conf.d/frontend.conf && /usr/sbin/nginx -s reload"]
|