1. 程式人生 > >k8s1.8 ingress 配置

k8s1.8 ingress 配置

ive k8s ace clas default sts pat root host



kubectl create secret tls ingress-secret-fengjian --key /data/sslkey/cinyi.key --cert /data/sslkey/cinyi.pem
[root@k8s1 ingress]# vim ingress.yaml 

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx-default
spec:
  rules:
  - host: nginx.cinyi.com
    http:
      paths:
      - backend:
          serviceName: nginx
-default servicePort: 80 [root@k8s1 ingress]# vim ingress_443.yaml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: nginx-default-443 namespace: default spec: tls: - hosts: - nginx.cinyi.com secretName: ingress-secret rules: - host: nginx.cinyi.com http: paths:
- backend: serviceName: nginx-default servicePort: 80 kubectl create secret tls ingress-secret-fengjian --key /data/sslkey/cinyi.key --cert /data/sslkey/cinyi.pem --namespace=fengjian [root@k8s1 ingress]# vim ingress-fengjian.yaml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: nginx
-fengjian-80 namespace: fengjian spec: rules: - host: feng.cinyi.com http: paths: - backend: serviceName: my-nginx-fengjian servicePort: 80 [root@k8s1 ingress]# vim ingress-fengjian-443.yaml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: nginx-fengjian-443 namespace: fengjian spec: tls: - hosts: - feng.cinyi.com secretName: ingress-secret-fengjian rules: - host: feng.cinyi.com http: paths: - backend: serviceName: my-nginx-fengjian servicePort: 80

技術分享

技術分享

k8s1.8 ingress 配置