Created
August 20, 2019 21:17
-
-
Save wesleywillians/d5adc3c954f62aa0a61daeaf5fddced8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: nginx-conf | |
data: | |
nginx.conf: | | |
server { | |
listen 80; | |
index index.php index.html; | |
root /usr/share/nginx/html; | |
rewrite ^/google$ http://google.com permanent; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: hello-nginx | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: hello-nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.17-alpine | |
ports: | |
- containerPort: 80 | |
resources: | |
requests: | |
memory: "100Mi" | |
cpu: "200m" | |
limits: | |
cpu: "250m" | |
memory: "200Mi" | |
volumeMounts: | |
- mountPath: /etc/nginx/conf.d | |
name: nginx-conf | |
readOnly: true | |
volumes: | |
- name: nginx-conf | |
configMap: | |
name: nginx-conf | |
items: | |
- key: nginx.conf | |
path: nginx.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx-service | |
spec: | |
type: LoadBalancer | |
ports: | |
- port: 80 | |
selector: | |
app: hello-nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment