{"id":52886,"date":"2020-04-09T16:03:22","date_gmt":"2020-04-09T08:03:22","guid":{"rendered":"http:\/\/4563.org\/?p=52886"},"modified":"2020-04-09T16:03:22","modified_gmt":"2020-04-09T08:03:22","slug":"okteto-%e7%94%a8%e5%91%bd%e4%bb%a4%e8%a1%8c%e6%90%ad%e5%bb%badockerv2ray%e6%95%99%e7%a8%8b-%e5%85%8d%e8%b4%b9-%e8%bd%ac-vps%e8%b5%84%e8%ae%af","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=52886","title":{"rendered":"okteto-\u7528\u547d\u4ee4\u884c\u642d\u5efadocker(v2ray)\u6559\u7a0b-\u514d\u8d39  [\u8f6c] &#8211; VPS\u8d44\u8baf"},"content":{"rendered":"<br \/>\n<h3>\u7b80\u4ecb<\/h3>\n<p>\u73a9k8s,\u8fd8\u5f97\u8bf4ctl,\u7f51\u9875\u5f88\u65b9\u4fbf,\u4f46\u662f\u5c40\u9650\u6027\u592a\u591a,\u4e0b\u9762\u662f\u6700\u57fa\u672c\u7684\u6b63\u5b97\u73a9\u6cd5:<br \/>\u6bd4\u8d77\u7f51\u9875\u90e8\u7f72,\u4e0b\u9762\u7684\u4ee3\u7801,\u81f3\u5c11\u53ef\u4ee5\u8bbe\u7f6e4G+2\u6838\u6765\u8fd0\u884c<br \/>\u5b9e\u6d4b\u6cb9\u7ba150Kb,\u4ec5\u4f9b\u5a31\u4e50<\/p>\n<h3>1.\u4e0b\u8f7d\u4e24\u4e2a\u6587\u4ef6\u653e\u5230 C:WindowsSystem32<\/h3>\n<pre><code>    https:\/\/downloads.okteto.com\/cli\/okteto.exe     https:\/\/storage.googleapis.com\/kubernetes-release\/release\/v1.18.0\/bin\/windows\/amd64\/kubectl.exe<\/code><\/pre>\n<h3>2.\u5c06v.yml \u653e\u5230\u684c\u9762,v.yml\u5185\u5bb9<\/h3>\n<pre><code>apiVersion: apps\/v1 kind: Deployment metadata:   name: v2ray spec:   replicas: 1   selector:     matchLabels:       app: v2ray   template:     metadata:       labels:         app: v2ray     spec:       containers:       - image: kuanfinn\/caddyandv:oqr         name: v2ray         ports:         - name : &quot;v2ray&quot;           containerPort: 8080         resources:           requests:             memory: &quot;2Gi&quot;             cpu: &quot;1&quot;           limits:             memory: &quot;4Gi&quot;             cpu: &quot;2&quot; --- apiVersion: v1 kind: Service metadata:   name: v2ray   annotations:     dev.okteto.com\/auto-ingress: &quot;true&quot; spec:   type: ClusterIP     ports:   - name: &quot;v2ray&quot;     port: 8080     targetPort: 8080     protocol: TCP   selector:     app: v2ray<\/code><\/pre>\n<h3>3.\u6253\u5f00cmd\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4<\/h3>\n<pre><code>    okteto login     okteto namespace XXXX[\u4f60\u7684\u547d\u540d\u7a7a\u95f4]     cd C:Usersshuaigedesktop (\u8fd9\u91cc\u662f\u684c\u9762\u8def\u5f84,\u653e.yml\u7684\u5730\u65b9)     kubectl apply -f v.yml<\/code><\/pre>\n<h3>4.\u8fde\u63a5\u4fe1\u606f:<\/h3>\n<pre><code>    \u5730\u5740\u6539\u4e00\u6539\u5373\u53ef        vmess:\/\/ew0KICAidiI6ICIyIiwNCiAgInBzIjogIm9rdGV0by10dCIsDQogICJhZGQiOiAidjJyYXktWFhYWFhYWFguY2xvdWQub2t0ZXRvLm5ldCIsDQogICJwb3J0IjogIjQ0MyIsDQogICJpZCI6ICJmYzc4NDU5Ni1jMTdkLTQ2ZGEtYmJiNC03ZDUxNDJiODg2NmEiLA0KICAiYWlkIjogIjEiLA0KICAibmV0IjogIndzIiwNCiAgInR5cGUiOiAibm9uZSIsDQogICJob3N0IjogIiIsDQogICJwYXRoIjogIi9lbGVjVjIiLA0KICAidGxzIjogInRscyINCn0=<\/code><\/pre>\n<p>\u5f53\u7136\u4e0b\u9762\u7684\u6559\u7a0b,\u4e0d\u4ec5\u4ec5\u662f\u6210\u54c1,\u66f4\u662f\u4e0d\u9519\u7684\u9ad8\u7ea7\u6559\u7a0b,\u5982\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u5168\u6587<br \/><a href=\"https:\/\/xhvps.info\/index.php\/go\/aHR0cHM6Ly9rYS5saW1vdS5jYy8=\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/ka.limou.cc\/<\/a><br \/>\u5907\u7528:<a href=\"https:\/\/xhvps.info\/index.php\/go\/aHR0cHM6Ly9zc2wtbGludXgtcTQwOTY0MDk3Ni5jbG91ZC5va3RldG8ubmV0Lw==\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/ssl-linux-q409640976.cloud.okteto.net\/<\/a><\/p>\n<h3>\u8f6c\u8f7d<\/h3>\n<p>\u8f6c\u8f7d\u81ea(<a href=\"https:\/\/xhvps.info\/index.php\/go\/aHR0cHM6Ly93d3cuaG9zdGxvYy5jb20vdGhyZWFkLTY3MDQ0My0xLTEuaHRtbCk=\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.hostloc.com\/thread-670443-1-1.html)<\/a><\/p>\n<div style=\"padding: 10px 0; margin: 20px auto; width: 100%; font-size:16px; text-align: center;\"> <button disable=\"enable\" onclick=\"var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}\"> <span>\u6253\u8d4f<\/span><\/button> <\/p>\n<div style=\"display: none;\">\n<div style=\"display: inline-block\"> <a rel=\"group\"> <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/04\/20200409_5e8ed6d32199c.jpg\" alt=\"okteto-\u7528\u547d\u4ee4\u884c\u642d\u5efadocker(v2ray)\u6559\u7a0b-\u514d\u8d39  [\u8f6c] - VPS\u8d44\u8baf\"><\/a> <\/p>\n<p>\u5fae\u4fe1\u6253\u8d4f<\/p>\n<\/p><\/div>\n<div style=\"display: inline-block\"> <a rel=\"group\"> <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/04\/20200409_5e8ed6da542e3.jpg\" alt=\"okteto-\u7528\u547d\u4ee4\u884c\u642d\u5efadocker(v2ray)\u6559\u7a0b-\u514d\u8d39  [\u8f6c] - VPS\u8d44\u8baf\"><\/a> <\/p>\n<p>\u652f\u4ed8\u5b9d\u6253\u8d4f<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb \u73a9k8s,\u8fd8\u5f97\u8bf4ctl,\u7f51\u9875&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/52886"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=52886"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/52886\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=52886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=52886"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=52886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}