ingress secret创建
[root@k8smaster testingress]# more ingress-secret.yaml
apiVersion: v1
data:
tls.crt: crt文件|base64
tls.key: key文件|base64
kind: Secret
metadata:
name: ingresssecret
namespace: default
type: Opaque
ingress的创建
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: operate-service
spec:
tls:
- hosts:
- testconsole.gcicsys.cn
secretName: ingresssecret
rules:
- host: testconsole.gcicsys.cn
http:
paths:
- path: /
backend:
serviceName: operate-service
servicePort: 8080
#
浏览器使用https访问即可