\r\nkubectl create namespace cattle-system\r\n<\/pre>\n\u5b89\u88c5rancher\uff1a<\/p>\n
\u56e0\u4e3a\u4e0a\u4e00\u7ae0\u5b89\u88c5\u8d1f\u8f7d\u5747\u8861\u7684\u65f6\u5019\u90e8\u7f72\u4e86cert-manager\u6240\u4ee5\u8fd9\u91cc\u4f7f\u7528Rancher \u751f\u6210\u7684\u81ea\u7b7e\u540d\u8bc1\u4e66\u6765\u5b89\u88c5\u3002<\/p>\n
\r\nhelm install rancher rancher-stable\/rancher --namespace cattle-system --set hostname=rancher.xxxx.net --set replicas=3<\/pre>\n\u4f7f\u7528kubectl -n cattle-system get pod\u547d\u4ee4\u67e5\u770b\u5b89\u88c5\u60c5\u51b5\u3002<\/p>\n
\u5230\u8fd9\u91cc\u6682\u65f6\u8fd8\u65e0\u6cd5\u8bbf\u95ee\uff0c\u9700\u8981\u7f16\u8f91ingress\u624d\u80fd\u6b63\u5e38\u66b4\u9732\u5904\u7406\uff0c\u5728aws\u7684\u8d1f\u8f7d\u5747\u8861\u4e0a\u6ce8\u518c\u3002<\/p>\n
\r\nkubectl -n cattle-system delete ingress rancher<\/pre>\n\u4fdd\u5b58\u4e0b\u9762\u7684\u5185\u5bb9\u5230rancher-ingress.yaml\u6587\u4ef6\u4e2d<\/p>\n
\r\napiVersion: extensions\/v1beta1\r\nkind: Ingress\r\nmetadata:\r\n annotations:\r\n alb.ingress.kubernetes.io\/certificate-arn: arn:aws:acm:ap-southeast-1:xxxxxxxx:certificate\/34105703-145a-12312-a28e-565e8be89c6a\r\n alb.ingress.kubernetes.io\/healthcheck-path: \/login\r\n alb.ingress.kubernetes.io\/listen-ports: '[{\"HTTPS\":443}]'\r\n alb.ingress.kubernetes.io\/scheme: internet-facing\r\n alb.ingress.kubernetes.io\/success-codes: 403,404\r\n alb.ingress.kubernetes.io\/target-type: ip\r\n kubernetes.io\/ingress.class: alb\r\n meta.helm.sh\/release-name: rancher\r\n meta.helm.sh\/release-namespace: cattle-system\r\n nginx.ingress.kubernetes.io\/proxy-connect-timeout: \"30\"\r\n nginx.ingress.kubernetes.io\/proxy-read-timeout: \"1800\"\r\n nginx.ingress.kubernetes.io\/proxy-send-timeout: \"1800\"\r\n name: rancher\r\n namespace: cattle-system\r\nspec:\r\n rules:\r\n - host: rancher.xxxxx.net\r\n http:\r\n paths:\r\n - backend:\r\n serviceName: rancher\r\n servicePort: 80\r\n pathType: ImplementationSpecific\r\n<\/pre>\n\u8fd9\u4e2aalb.ingress\u7684\u6ce8\u91ca\u662faws\u7684\u8d1f\u8f7d\u5747\u8861\uff0c\u5177\u4f53\u4f7f\u7528\u65b9\u5f0f\u8bf7\u53c2\u8003<\/p>\n
https:\/\/kubernetes-sigs.github.io\/aws-load-balancer-controller\/v2.2\/guide\/ingress\/annotations\/\r\narn:aws:acm:ap-southeast-1:xxxxxxxx:certificate\/34105703-145a-12312-a28e-565e8be89c6a<\/pre>\n\u8fd9\u4e2a\u662f\u4e9a\u9a6c\u900a\u4e0a\u7684\u8bc1\u4e66arn\u5185\u5bb9\uff0c\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f\u5916\u90e8\u7684\u5176\u5b83\u8bc1\u4e66\u8bf7\u53c2\u8003<\/p>\n
https:\/\/docs.rancher.cn\/docs\/rancher2.5\/installation\/install-rancher-on-k8s\/_index rancher<\/pre>\n\u5b89\u88c5\u6587\u6863\u3002rules:\u7684hosts\u4fee\u6539\u6210\u81ea\u5df1\u7684\u57df\u540d\u3002<\/p>\n
\u6267\u884c kubectl apply -f rancher-ingress.yaml kubectl -n cattle-system get ingress \u67e5\u770b\u72b6\u6001\uff0c\u5982\u679c\u6210\u529f\u5c31\u4f1a\u5728ADDRESS\u4e00\u680f\u770b\u5230\u5185\u5bb9<\/p>\n
\r\nkubectl -n cattle-system get ingress\r\nNAME CLASS HOSTS ADDRESS PORTS AGE\r\nrancher rancher.xxxxx.net k8s-cattlesy-rancher-xxxxx-xxxx.ap-southeast-1.elb.amazonaws.com 80 28s\r\n<\/none><\/pre>\n\u8fd9\u6837\u6682\u65f6\u8fd8\u65e0\u6cd5\u8bbf\u95ee\uff0c\u4f60\u9700\u8981\u5728dns\u4e2d\u6dfb\u52a0CNAME\u89e3\u6790\u8bb0\u5f55\u6307\u5411\u8fd9\u4e2aADDRESS\u4e2d\u7684\u5730\u5740\u3002<\/p>\n
\u6dfb\u52a0dns:
\n<\/p>\n
\u89e3\u6790\u5b8c\u6210\u5c31\u53ef\u4ee5\u8f93\u5165\u57df\u540d\u8bbf\u95eerancher\u4e86\u3002\u5982https:\/\/rancher.xxxx.net\u5269\u4e0b\u7684\u5c31\u662f\u8bbe\u7f6e\u5bc6\u7801\uff0c\u7b49\u52a8\u4f5c\u3002<\/p>\n
<\/p>\n
\u8fd9\u6837\u754c\u9762\u5c31\u7b97\u5b8c\u5168\u5b89\u88c5\u6210\u529f\u4e86\u3002\u4f46\u662f\u76ee\u524d\u8fd8\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528\uff0c\u6211\u4eec\u8fd8\u7f3a\u5c11\u4e00\u4e9b\u5176\u5b83\u4e1c\u897f\u3002\u6bd4\u5982\u955c\u50cf\u4ed3\u5e93\u8fd9\u4e9b\uff0c\u4e0b\u4e00\u7ae0\u8bb2\u5982\u679c\u81ea\u5efa\u955c\u50cf\u4ed3\u5e93\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u4f7f\u7528helm\u8fdb\u884c\u5b89\u88c5\u64cd\u4f5c\uff0c\u6240\u4ee5\u8fd9\u91cc\u9700\u8981\u4e0b\u8f7d\u4e00\u4e2ahelm\u5de5\u5177\u3002 wget https:\/\/get.helm.sh […]<\/p>\n","protected":false},"author":362,"featured_media":222219,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-222216","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/222216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/362"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=222216"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/222216\/revisions"}],"predecessor-version":[{"id":222224,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/222216\/revisions\/222224"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/222219"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=222216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=222216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=222216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}