Author
Micro letter: tangy8080
E-mail: [email protected]
Updated: 2019-06-25 13:54:15 Tuesday
Welcome to subscribe to and share my subscription number, occasionally Share Article prepared some of my own learning process within the subscription number
if you find the article error in the reading process, you can add my micro letter tangy8080 feedback. Thanks for your support .
Topic
[no]
Pre-conditions
[no]
text
Ingress-controller on the role of
Contents 1
Content 2
Installation Ingress-Nginx
helm install stable/nginx-ingress --name nginx-ingress --set controller.metrics.enabled=true,controller.kind=DaemonSet,controller.stats.enabled=true,controller.stats.enabled=true,controller.service.type=NodePort,controller.service.nodePorts.http=30080,controller.service.nodePorts.https=30443
- controller.hostNetwork = true exposure setting POD 80 and 443 on the host
- controller.service.type=ClusterIP
[Demand] Uninstall Ingress-Nginx
helm del --purge nginx-ingress
Content 2
ssl support
Create a secret file
kubectl create secret tls ingress-secret --key /usr/local/nginx/cert/private.key --cert /usr/local/nginx/cert/certificate.crt
Use secret for Ingress
{
"kind":"Ingress",
"apiVersion":"extensions/v1beta1",
"metadata":{
"name":"consul-ui",
"namespace":"default",
"labels":{
"app":"consul",
"remark":"consul-ui-ingress"
},
"annotations":{
"kubernetes.io/ingress.class":"nginx",
"nginx.ingress.kubernetes.io/auth-realm":"'Authentication Required - consul'",
"nginx.ingress.kubernetes.io/auth-secret":"basic-auth",
"nginx.ingress.kubernetes.io/auth-type":"basic"
}
},
"spec":{
"tls":[
{
"hosts":[
"consul.honeysuckle.site"
],
"secretName":"ingress-secret"
}
],
"rules":[
{
"host":"consul.honeysuckle.site",
"http":{
"paths":[
{
"path":"/",
"backend":{
"serviceName":"registry-consul-ui",
"servicePort":8500
}
}
]
}
}
]
}
}
Reference links
https://mritd.me/2017/03/04/how-to-use-nginx-ingress/