{"id":506,"date":"2020-06-02T18:16:49","date_gmt":"2020-06-02T10:16:49","guid":{"rendered":"https:\/\/www.funnymuddy.com\/?p=506"},"modified":"2020-06-19T14:10:49","modified_gmt":"2020-06-19T06:10:49","slug":"crc-openshift-4","status":"publish","type":"post","link":"https:\/\/www.funnymuddy.com\/?p=506","title":{"rendered":"CRC &#8211; OpenShift 4"},"content":{"rendered":"\n<p>OCP3.x\u7528MiniShift\u6765\u642d\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u672c\u5730OpenShift\u96c6\u7fa4\uff0c<a rel=\"noreferrer noopener\" href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_codeready_containers\/1.10\/html\/getting_started_guide\/introducing-codeready-containers_gsg\" target=\"_blank\">CRC<\/a> (Red Hat CodeReady Containers)\u662f\u7ed94.x\u51c6\u5907\u7684\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Intall<\/h2>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/cloud.redhat.com\/openshift\/install\/crc\/installer-provisioned\" target=\"_blank\">Download page<\/a><\/p>\n\n\n\n<p>Extract tar.xz and place in $path (~\/.bash_profile)<br>$crc setup<br>$crs start<\/p>\n\n\n\n<p>&#8220;Image pull secret&#8221; is required for the installation, it can be got \/ copied from <a rel=\"noreferrer noopener\" href=\"https:\/\/cloud.redhat.com\/openshift\/install\/crc\/installer-provisioned\" target=\"_blank\">Download page<\/a><br><br>\u6210\u529f\u540e\u4f1a\u6709\u5982\u4e0b\u63d0\u793a\u4fe1\u606f\uff1a<\/p>\n\n\n\n<p>INFO To access the cluster, first set up your environment by following &#8216;crc oc-env&#8217; instructions\u00a0<br>INFO Then you can access it by running &#8216;oc login -u developer -p developer https:\/\/api.crc.testing:6443&#8217;\u00a0<br>INFO To login as an admin, run &#8216;oc login -u kubeadmin -p 8rynV-SeYLc-h8Ij7-YPYcz https:\/\/api.crc.testing:6443&#8217;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br>INFO You can now run &#8216;crc console&#8217; and use these credentials to access the OpenShift web console\u00a0<br>Started the OpenShift cluster<\/p>\n\n\n\n<p>$crc oc-env<br>$eval $(crc oc-env)<br>$oc login -u developer -p developer https:\/\/api.crc.testing:6443<br>$oc login -u kubeadmin -p 8rynV-SeYLc-h8Ij7-YPYcz https:\/\/api.crc.testing:6443<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ODO<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">$curl -L https:\/\/mirror.openshift.com\/pub\/openshift-v4\/clients\/odo\/latest\/odo-darwin-amd64 -o \/usr\/local\/bin\/odo\n$chmod +x \/usr\/local\/bin\/odo\n<a rel=\"noreferrer noopener\" href=\"https:\/\/access.redhat.com\/documentation\/en-us\/openshift_container_platform\/4.4\/html-single\/cli_tools\/index#installing-odo\" target=\"_blank\">Install guide<\/a><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Use CRC<\/h2>\n\n\n\n<p><a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_codeready_containers\/1.11\/html\/getting_started_guide\/using-codeready-containers_gsg#deploying-sample-application-with-odo_gsg\" target=\"_blank\" rel=\"noreferrer noopener\">Guide<\/a> <\/p>\n<div class=\"pvc_clear\"><\/div><p id=\"pvc_stats_506\" class=\"pvc_stats all  \" data-element-id=\"506\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img decoding=\"async\" src=\"https:\/\/www.funnymuddy.com\/wp-content\/plugins\/page-views-count\/ajax-loader.gif\" border=0 \/><\/p><div class=\"pvc_clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>OCP3.x\u7528MiniShift\u6765\u642d\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u672c\u5730OpenShift\u96c6\u7fa4\uff0cCRC (Red Hat Code&hellip;&nbsp;<a href=\"https:\/\/www.funnymuddy.com\/?p=506\" class=\"\" rel=\"bookmark\">\u9605\u8bfb\u66f4\u591a &raquo;<span class=\"screen-reader-text\">CRC &#8211; OpenShift 4<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_506\" class=\"pvc_stats all  \" data-element-id=\"506\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img decoding=\"async\" src=\"https:\/\/www.funnymuddy.com\/wp-content\/plugins\/page-views-count\/ajax-loader.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[35],"class_list":["post-506","post","type-post","status-publish","format-standard","hentry","category-6","tag-openshift"],"_links":{"self":[{"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=\/wp\/v2\/posts\/506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=506"}],"version-history":[{"count":7,"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions"}],"predecessor-version":[{"id":582,"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions\/582"}],"wp:attachment":[{"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.funnymuddy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}