{"id":826,"date":"2020-03-30T09:00:00","date_gmt":"2020-03-30T09:00:00","guid":{"rendered":"http:\/\/bullyrooks.com\/index.php\/2020\/04\/02\/simple-spring-boot-service-to-kubernetes-application-step-9-55fd26c1dffb\/"},"modified":"2021-02-04T01:53:50","modified_gmt":"2021-02-04T01:53:50","slug":"simple-spring-boot-service-to-kubernetes-application-step-9-55fd26c1dffb","status":"publish","type":"post","link":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-9-55fd26c1dffb\/","title":{"rendered":"Docker Registry"},"content":{"rendered":"\n<p class=\"graf graf--p graf-after--h3 graf--trailing\" id=\"33e8\">In the previous article we created a docker image as part of our build process and stored it into our local repository. In order to deploy it in an automated fashion we should create a remote image repository in the cloud. This will expand the types of tools that we can use as well as allow for a gitops workflow that will automatically deploy our application when code is released into the master branch.<\/p>\n\n\n\n<h3 class=\"graf graf--h3 graf--leading wp-block-heading\" id=\"4fdd\">Remote Docker&nbsp;Registry<\/h3>\n\n\n\n<h4 class=\"graf graf--h4 graf-after--h3 wp-block-heading\" id=\"7896\">Create a Docker&nbsp;Registry<\/h4>\n\n\n\n<p class=\"graf graf--p graf-after--h4\" id=\"5cc2\">There are plenty of cloud based docker registries. ECR is a very good choice but the free tier only allows for 500MB of storage. Each of our images is going to be around 100MB and each release is going to generate an image, so we would only need a few services with a few versions before we started running out of space.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"4b8e\">We\u2019re going to use <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/codefresh.io\/\" target=\"_blank\" rel=\"noopener\" data-href=\"https:\/\/codefresh.io\/\">codefresh<\/a> for the docker repository. Go ahead and create an account at codefresh. Codefresh gives you a docker repository on creation. Lets get the details. Go to Account Settings, under Integrations select docker registry. Hit the pencil on the default registry (mine is cfcr) and click on generate token. At the bottom here under codefresh registry generate a new token. Call it <code class=\"markup--code markup--p-code\">local<\/code> and hit the create button. Save this token somewhere and click the <code class=\"markup--code markup--p-code\">copy docker login command to clipboard<\/code> to generate a login command we\u2019re going to use to access this registry.<\/p>\n\n\n\n<h4 class=\"graf graf--h4 graf-after--p wp-block-heading\" id=\"836e\">Pushing our Image&nbsp;Up<\/h4>\n\n\n\n<p class=\"graf graf--p graf-after--h4\" id=\"8485\">paste the contents of the clipboard into your CLI. It should look something like this:<\/p>\n\n\n\n<pre id=\"686b\" class=\"wp-block-code graf graf--pre graf-after--p\"><code>docker login r.cfcr.io -u brianrook -p da3***<\/code><\/pre>\n\n\n\n<p class=\"graf graf--p graf-after--pre\" id=\"9a34\">Lets tag the build we just made with the version number. We\u2019re cloning our image into one that matches the remote repository name and adding the tag. Make sure to replace the <code class=\"markup--code markup--p-code\">${account}<\/code> with the account name you created when you registered.<\/p>\n\n\n\n<pre id=\"f94d\" class=\"wp-block-code graf graf--pre graf-after--p\"><code>docker tag medium\/medium-customer:latest r.cfcr.io\/${account}\/medium-customer:0.0.1-SNAPSHOT<\/code><\/pre>\n\n\n\n<p class=\"graf graf--p graf-after--pre\" id=\"dd18\">and confirm that we have tagged it successfully<\/p>\n\n\n\n<pre id=\"21c8\" class=\"wp-block-code graf graf--pre graf-after--p\"><code>docker image list\nREPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE\nr.cfcr.io\/docketdynamics\/medium-customer   0.0.1-SNAPSHOT      7f9b379551d8        50 years ago        260MB\nmedium\/medium-customer                                latest              7f9b379551d8        50 years ago        260MB<\/code><\/pre>\n\n\n\n<p class=\"graf graf--p graf-after--pre\" id=\"4184\">Now lets push the tagged version up to the remote registry<\/p>\n\n\n\n<pre id=\"e568\" class=\"wp-block-code graf graf--pre graf-after--p\"><code>docker push r.cfcr.io\/${account}\/medium-customer:0.0.1-SNAPSHOT<\/code><\/pre>\n\n\n\n<p class=\"graf graf--p graf-after--pre\" id=\"5f2c\">and confirm that it made its way into our remote repo<\/p>\n\n\n\n<pre id=\"8644\" class=\"wp-block-code graf graf--pre graf-after--p\"><code>docker pull r.cfcr.io\/docketdynamics\/medium-customer:0.0.1-SNAPSHOT\n0.0.1-SNAPSHOT: Pulling from docketdynamics\/medium-customer\nDigest: sha256:25bdbfe086162e262607fc800db458400c2d1bf4f9b9bf11e7c6c48cb75c8c2e\nStatus: Image is up to date for r.cfcr.io\/docketdynamics\/medium-customer:0.0.1-SNAPSHOT\nr.cfcr.io\/docketdynamics\/medium-customer:0.0.1-SNAPSHOT<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"entry-summary\">\nIn the previous article we created a docker image as part of&hellip;\n<\/div>\n<div class=\"link-more\"><a href=\"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-9-55fd26c1dffb\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Docker Registry&rdquo;<\/span>&hellip;<\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[5,75],"course":[40],"class_list":["post-826","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-docker","tag-docker-registry","course-spring-with-kubernetes","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":824,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-10-e1a3a8e865bb\/","url_meta":{"origin":826,"position":0},"title":"Automated Build Pipeline","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"Lets set up automated build so that we can generate a docker image when a change hits master. Build the\u00a0Pipeline Go in to codefresh and choose Projects. Create a new project in the top right. Call it medium. Click on create pipeline. Call the pipeline medium-customer and choose our git\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":816,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-12-c6423261a93a\/","url_meta":{"origin":826,"position":1},"title":"Setting up a Kubernetes Cluster","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"Finally, we\u2019re going to be able to deploy our application. We need to get access to a cluster first. Install Tooling We\u2019re going to need more tools in order to get started. Use your OS package management tool to install these tools: Kubectl (Interact with a k8s instance)Minikube (Run a\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":833,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-18-9dff659cd334\/","url_meta":{"origin":826,"position":2},"title":"UI Build Pipeline","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"Simple Spring Boot Service to Kubernetes Application: Step\u00a018 Lets quickly update our build pipeline to push an image for our front end application into our repo. This opens the path to using helm to package and deploy our chart. Create a New\u00a0Pipeline Log into codefresh and go into pipelines. Choose\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1169,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/04\/cloud-kube-docker-build-and-registry\/","url_meta":{"origin":826,"position":3},"title":"Cloud Kube | Docker Build and Registry","author":"Bullyrook","date":"January 4, 2022","format":false,"excerpt":"Now that we've got a pipeline, we're going to start working on deploying our service into the cloud. The first step is to create a docker image and store it somewhere that our pipeline as well as our cloud provider can access. Create a Docker Image Registry Canister.io provides a\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-19.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1188,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/04\/cloud-kube-setup-cloud-hosting\/","url_meta":{"origin":826,"position":4},"title":"Cloud Kube | Setup Cloud Hosting","author":"Bullyrook","date":"January 4, 2022","format":false,"excerpt":"We've got a helm chart and associated docker image. Now we're going to setup a cloud kubernetes provider to deploy our application to. Okteto offers a very generous kubernetes hosting platform that's free for small developer projects. Setup Okteto First register on okteto by creating an account via your github\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-31.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-31.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-31.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":549,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/01\/25\/installing-portainer-in-docker-on-synology\/","url_meta":{"origin":826,"position":5},"title":"Installing Portainer in Docker on Synology","author":"Bullyrook","date":"January 25, 2021","format":false,"excerpt":"Although we can install and run docker containers directly in the synology docker package, I recommend installing portainer as a docker management tool. Portainer has a nice web based user interface, which means that you can access it directly via the browser instead of logging into the synology DSM and\u2026","rel":"","context":"In &quot;Home Networking&quot;","block_context":{"text":"Home Networking","link":"https:\/\/bullyrooks.com\/index.php\/category\/technology\/home-networking\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-23-at-6.00.11-PM.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/comments?post=826"}],"version-history":[{"count":3,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/826\/revisions"}],"predecessor-version":[{"id":893,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/826\/revisions\/893"}],"wp:attachment":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/media?parent=826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/categories?post=826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/tags?post=826"},{"taxonomy":"course","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/course?post=826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}