История изменений
Исправление letema88, (текущая версия) :
ingress ставил через kubespray
ingress_nginx_enabled: true
ingress_nginx_nodeselector:
node-role.kubernetes.io/ingress: "true"
ingress_nginx_tolerations:
- key: "node-role.kubernetes.io/ingress"
operator: "Exists"
inventory.ini
kub-ingress-1 ansible_host=1.1.1.1 ip=192.168.0.22
ingress service
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx
namespace: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
type: NodePort
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
- name: https
port: 443
targetPort: 443
protocol: TCP
externalIPs:
- 1.1.1.1
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
сам ингресс
rules:
- host: test.ru
http:
paths:
- path: /
backend:
serviceName: имя службы
servicePort: порт
Исправление letema88, :
ingress ставил через kubespray
ingress_nginx_enabled: true
ingress_nginx_nodeselector:
node-role.kubernetes.io/ingress: "true"
ingress_nginx_tolerations:
- key: "node-role.kubernetes.io/ingress"
operator: "Exists"
inventory.ini
kub-ingress-1 ansible_host=1.1.1.1 ip=192.168.0.22
ingress service
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx
namespace: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
type: NodePort
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
- name: https
port: 443
targetPort: 443
protocol: TCP
externalIPs:
- 1.1.1.1
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
Исходная версия letema88, :
ingress ставил через kubespray [code]ingress_nginx_enabled: true
ingress_nginx_nodeselector: node-role.kubernetes.io/ingress: «true»
ingress_nginx_tolerations:
- key: «node-role.kubernetes.io/ingress» operator: «Exists» [/code]
inventory.ini [code]kub-ingress-1 ansible_host=1.1.1.1 ip=192.168.0.22[/code]
ingress service [code]apiVersion: v1 kind: Service metadata: name: ingress-nginx namespace: ingress-nginx labels: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx spec: type: NodePort ports: - name: http port: 80 targetPort: 80 protocol: TCP - name: https port: 443 targetPort: 443 protocol: TCP externalIPs: - 1.1.1.1 selector: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx[/code]