{"id":4351,"date":"2023-02-21T14:56:52","date_gmt":"2023-02-21T06:56:52","guid":{"rendered":"https:\/\/km94.com\/?p=4351"},"modified":"2023-02-21T14:56:52","modified_gmt":"2023-02-21T06:56:52","slug":"vultr-kubernetes-engine-vke%e5%ae%89%e8%a3%85mysql-operator%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/dy208.cn\/index.php\/2023\/02\/21\/vultr-kubernetes-engine-vke%e5%ae%89%e8%a3%85mysql-operator%e6%95%99%e7%a8%8b\/","title":{"rendered":"Vultr Kubernetes Engine (VKE)\u5b89\u88c5MySQL Operator\u6559\u7a0b"},"content":{"rendered":"<p>\u56fd\u5916\u670d\u52a1\u5668\u79df\u8d41\u5546\u5bb6Vultr\u76ee\u524d\u5df2\u652f\u6301\u5b8c\u5168\u6258\u7ba1Kubernetes\u670d\u52a1\uff0c\u53ef\u5b9e\u73b0\u5feb\u901f\u90e8\u7f72\u548c\u7ba1\u7406\u5bb9\u5668\u5316\u5e94\u7528\u7a0b\u5e8f\u3002MySQL Operator\u662fKubernetes\u7684\u6269\u5c55\uff0c\u5b83\u7b80\u5316\u4e86MySQL\u96c6\u7fa4\u7684\u90e8\u7f72\u548c\u7ba1\u7406\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u4e0b\u5982\u4f55\u5728Vultr Kubernetes Engine (VKE)\u5b89\u88c5MySQL Operator\u3002<\/p>\n<p>MySQL Operator\u4f5c\u4e3aKubernetes\u7684\u6269\u5c55\uff0c\u5b83\u5b9a\u4e49\u4e86InnoDBCluster\u548cMySQLBackup\u8d44\u6e90\u7c7b\u578b\u3001\u89d2\u8272\u7ed1\u5b9a\u548c\u8fd0\u7b97\u7b26\u7b49\uff0c\u8d1f\u8d23\u7ba1\u7406\u6574\u4e2a\u751f\u547d\u5468\u671f\u7684\u8bbe\u7f6e\u548c\u7ef4\u62a4\uff0c\u5305\u62ec\u5347\u7ea7\u548c\u5907\u4efd\u7684\u81ea\u52a8\u5316\u3002<\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u5728Vultr\u4e91\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u4e00\u4e2aKubernetes\u96c6\u7fa4\u81f3\u5c11\u6709\u4e09\u4e2a\u8282\u70b9\uff0c\u6bcf\u4e2a\u8282\u70b9\u67092GB\u5185\u5b58\u548c2\u4e2aCPU\u3002\u5728Vultr\u7ba1\u7406\u63a7\u5236\u53f0\u4e0a\u6267\u884c\u4e0b\u9762\u6b65\u9aa4\uff0c\u4ee5\u5b89\u88c5MySQL Operator\u3002<\/p>\n<p>1\u3001\u514b\u9686MySQL Operator\u5b58\u50a8\u5e93<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\"># git clone https:\/\/github.com\/mysql\/mysql-operator.git<\/code><\/pre>\n<p>2\u3001\u5207\u6362\u5230\u5b58\u50a8\u5e93\u76ee\u5f55<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\"># cd mysql-operator<\/code><\/pre>\n<p>3\u3001\u5b89\u88c5\u81ea\u5b9a\u4e49\u8d44\u6e90\u5b9a\u4e49<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\"># kubectl apply -f deploy\/deploy-crds.yaml<\/code><\/pre>\n<p>\u901a\u8fc7\u4e0a\u9762\u547d\u4ee4\uff0c\u6211\u4eec\u53ef\u5b89\u88c5InnoDBCluster\u548cMySQLBackup\u7fa4\u96c6\u4e2d\u7684\u8d44\u6e90\u7c7b\u578b\u3002\u7136\u540e\u4f7f\u7528InnoDBCluster\u8d44\u6e90\u7c7b\u578b\u6765\u5b9a\u4e49MySQL\u96c6\u7fa4\u548cMySQLBackup\u521b\u5efa\u5907\u4efd\u7684\u8d44\u6e90\u7c7b\u578b\u3002<\/p>\n<p>4\u3001\u5b89\u88c5MySQL Operator<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\"># kubectl apply -f deploy\/deploy-operator.yaml<\/code><\/pre>\n<p>\u8be5\u547d\u4ee4\u53ef\u4ee5\u5728\u96c6\u7fa4\u4e2d\u5b89\u88c5\u5fc5\u8981\u7684\u89d2\u8272\u7ed1\u5b9a\u548cmysql\/mysql-operator\u955c\u50cf\u3002Operator\u662f\u4e00\u4e2a\u5bb9\u5668\uff0c\u5b83\u53ef\u4ee5\u76d1\u89c6\u548c\u67e5\u627e\u96c6\u7fa4\u4e2d\u7684\u72b6\u6001\u53d8\u5316\uff0c\u4ee5\u521d\u59cb\u5316\u548c\u7ba1\u7406MySQL\u96c6\u7fa4\u7684\u7ba1\u7406\u3002<\/p>\n<p>\u9a8c\u8bc1\u5b89\u88c5\uff1a<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\"># kubectl get pods -n mysql-operator<\/code><\/pre>\n<p>\u5982\u679c\u5728Kubernetes\u4e0a\u6210\u529f\u5b89\u88c5\u4e86MySQL Operator\uff0c\u90a3\u4e48\u53ef\u4ee5\u5f97\u5230\u7c7b\u4f3c\u4e0b\u9762\u7684\u8f93\u51fa\u7ed3\u679c\uff1a<\/p>\n<p>\n\t<figure class=\"wp-block-image size-full\"><img decoding=\"async\" class=\"wp-image-4353\" alt=\"k8s\u5b89\u88c5MySQL Operator\" src=\"https:\/\/km94.com\/wp-content\/uploads\/2023\/02\/op.jpg\"><\/figure>\n\t<\/p>\n\n<div>\n<div>\n\n\n\n<\/div>\n<div>\n\n\n\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\u56fd\u5916\u670d\u52a1\u5668\u79df\u8d41\u5546\u5bb6Vultr\u76ee\u524d\u5df2\u652f\u6301\u5b8c\u5168\u6258\u7ba1Kubernetes\u670d\u52a1\uff0c\u53ef\u5b9e\u73b0\u5feb\u901f\u90e8\u7f72\u548c\u7ba1\u7406\u5bb9\u5668\u5316\u5e94\u7528\u7a0b\u5e8f\u3002M&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4352,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,2],"tags":[],"class_list":["post-4351","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zjjc","category-jc","entry"],"_links":{"self":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/4351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/comments?post=4351"}],"version-history":[{"count":0,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/4351\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/media?parent=4351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/categories?post=4351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/tags?post=4351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}