idk i brought Istio and some other things
This commit is contained in:
25
nginx_ingress/README.md
Normal file
25
nginx_ingress/README.md
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
##### https://github.com/istio/istio/tree/master/samples
|
||||
|
||||
```shell
|
||||
$ kubectl get ingress
|
||||
NAME CLASS HOSTS ADDRESS PORTS AGE
|
||||
demo-localhost nginx demo.localdev.me 192.168.1.31 80 21h
|
||||
$ curl 192.168.1.31
|
||||
<html>
|
||||
<head><title>404 Not Found</title></head>
|
||||
<body>
|
||||
<center><h1>404 Not Found</h1></center>
|
||||
<hr><center>nginx</center>
|
||||
</body>
|
||||
</html>
|
||||
$ curl 192.168.1.31 -HHOST:demo.localdev.me
|
||||
<html><body><h1>It works!</h1></body></html>
|
||||
```
|
||||
|
||||
|
||||
https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/
|
||||
|
||||
ingress-nginx
|
||||
|
||||
https://docs.nginx.com/nginx-ingress-controller/
|
61
nginx_ingress/example.yaml
Normal file
61
nginx_ingress/example.yaml
Normal file
@ -0,0 +1,61 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
#namespace: nginx-ingress-testing
|
||||
labels:
|
||||
environment: nginx-deployment
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
name: nginx-service
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: nginx-service
|
||||
spec:
|
||||
containers:
|
||||
- name: nginxo
|
||||
image: nginx
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress-myservicea
|
||||
#namespace: nginx-ingress-testing
|
||||
spec:
|
||||
rules:
|
||||
#- host: *
|
||||
- http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: nginx-deployment
|
||||
port:
|
||||
number: 80
|
||||
ingressClassName: nginx
|
||||
#---
|
||||
#apiVersion: networking.k8s.io/v1
|
||||
#kind: Ingress
|
||||
#metadata:
|
||||
# name: ingress-myserviceb
|
||||
# namespace: nginx-ingress-testing
|
||||
#spec:
|
||||
# rules:
|
||||
# - host: myserviceb.foo.org
|
||||
# http:
|
||||
# paths:
|
||||
# - path: /
|
||||
# pathType: Prefix
|
||||
# backend:
|
||||
# service:
|
||||
# name: myserviceb
|
||||
# port:
|
||||
# number: 80
|
||||
# ingressClassName: nginx
|
Reference in New Issue
Block a user