<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Hu</title>
    <description>The latest articles on DEV Community by Daniel Hu (@danielhu).</description>
    <link>https://dev.to/danielhu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F844039%2F7e3a58ed-8535-4277-ad2c-3b7917d1cb13.jpeg</url>
      <title>DEV Community: Daniel Hu</title>
      <link>https://dev.to/danielhu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danielhu"/>
    <language>en</language>
    <item>
      <title>Top 10 Open-Source DevOps Tools That You Should Know</title>
      <dc:creator>Daniel Hu</dc:creator>
      <pubDate>Mon, 21 Nov 2022 03:42:37 +0000</pubDate>
      <link>https://dev.to/danielhu/top-10-open-source-devops-tools-that-you-should-know-ndg</link>
      <guid>https://dev.to/danielhu/top-10-open-source-devops-tools-that-you-should-know-ndg</guid>
      <description>&lt;p&gt;Do you know how many open-source tools are in DevOps?&lt;/p&gt;

&lt;p&gt;Have you ever seen the picture below?&lt;/p&gt;

&lt;p&gt;Have you ever felt lost in the DevOps world with seemingly more than 1000 different tools?&lt;/p&gt;

&lt;p&gt;If you are struggling with these questions now, then today you are in luck because I’m here to help you figure out the most popular DevOps tools.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn1vevk96vtcf7qg7eal0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn1vevk96vtcf7qg7eal0.png" alt="DevOps Periodic Table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wait, what’s the DevOps?
&lt;/h2&gt;

&lt;p&gt;"What's the DevOps?"&lt;/p&gt;

&lt;p&gt;This's a controversial topic, and I'm not gonna go into it in this post. I'd like to give you an equation here only:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DevOps = Culture + Toolchain + Practice&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And today I just want to introduce you to some popular tools.&lt;/p&gt;

&lt;p&gt;If you are a Chinese reader, I can give you an article that I wrote some months ago which is named:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.danielhu.cn/what-is-devops/" rel="noopener noreferrer"&gt;什么是 DevOps？看这一篇就够了！&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Top 10 Open-Source DevOps Tools Rundown
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1、GitLab CE
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gitlab.com/gitlab-org/gitlab" rel="noopener noreferrer"&gt;GitLab Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are 2 major editions of GitLab:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitLab Community Edition (CE) is available freely under the MIT Expat license.&lt;/li&gt;
&lt;li&gt;GitLab Enterprise Edition (EE) includes extra features that are more useful for organizations with more than 100 users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before I introduce you to GitLab, I'd like to talk a little bit about Git.&lt;br&gt;
Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.&lt;br&gt;
Version control provides developers with a means by which they can keep track of all the changes and updates in their codes.&lt;br&gt;
With Git, you must have thought that we need a "Git server". As an alternative to GitHub, if you want to deploy the "Git server" privately, GitLab CE might be a good choice.&lt;/p&gt;

&lt;p&gt;GitLab CE is an open-source end-to-end software development platform with built-in version control, issue tracking, code review, CI/CD, etc.&lt;br&gt;
The main features of GitLab CE are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manage Git repositories with fine-grained access controls that keep your code secure;&lt;/li&gt;
&lt;li&gt;Perform code reviews and enhance collaboration with merge requests;&lt;/li&gt;
&lt;li&gt;Complete continuous integration (CI) and continuous deployment/delivery (CD) pipelines to build, test, and deploy your applications;&lt;/li&gt;
&lt;li&gt;Each project can also have an issue tracker, issue board, and a wiki.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitLab has been used by more than 100,000 organizations, and it's the most popular solution to manage Git repositories on-premises.&lt;/p&gt;

&lt;h3&gt;
  
  
  2、Jenkins
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/jenkinsci/jenkins" rel="noopener noreferrer"&gt;Jenkins Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Jenkins is one of the best open-source continuous integration and automation server due to the over 1,800 plugins to support creating, delivering, and automating any project.&lt;/p&gt;

&lt;p&gt;Using Jenkins to automate your development workflow will help you to focus on the work that matter most.&lt;br&gt;
Jenkins is commonly used for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Building projects&lt;/li&gt;
&lt;li&gt;Running tests&lt;/li&gt;
&lt;li&gt;Static code analysis&lt;/li&gt;
&lt;li&gt;Deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can execute repetitive tasks, save time, and optimize your development process with Jenkins.&lt;/p&gt;

&lt;h3&gt;
  
  
  3、Argo CD
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/argoproj/argo-cd" rel="noopener noreferrer"&gt;Argo CD Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Argo CD is a declarative, continuous delivery tool for Kubernetes, which uses the principle of GitOps.&lt;br&gt;
GitOps is a principle of using Git as the "single source of truth" for application deployment information.&lt;br&gt;
It ensures that the state of a deployment is the same as the state which is defined in the Git repository.&lt;/p&gt;

&lt;p&gt;Why should you use Argo CD？&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application definitions, configurations, and environments should be declarative and version controlled.&lt;/li&gt;
&lt;li&gt;Application deployment and lifecycle management should be automated, auditable, and easy to understand.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4、Tekton
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/tektoncd/pipeline" rel="noopener noreferrer"&gt;Tekton Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tekton is a powerful yet flexible Kubernetes-native open-source framework for creating CI/CD systems.&lt;br&gt;
It's open-source and part of the CD Foundation, a Linux Foundation project.&lt;/p&gt;

&lt;p&gt;The main project with Tekton is Tekton Pipelines. It provides k8s-style resources for declaring CI/CD-style pipelines.&lt;br&gt;
The Tekton Pipelines are cloud-native and decoupled:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run on Kubernetes;&lt;/li&gt;
&lt;li&gt;Have Kubernetes clusters as a first-class type;&lt;/li&gt;
&lt;li&gt;Use containers as building blocks;&lt;/li&gt;
&lt;li&gt;One Pipeline can be used to deploy to any k8s cluster;&lt;/li&gt;
&lt;li&gt;The Tasks which make up a Pipeline can easily be run in isolation;&lt;/li&gt;
&lt;li&gt;Resources such as git repositories can easily be swapped between runs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5、Ansible
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/ansible/ansible" rel="noopener noreferrer"&gt;Ansible Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ansible is a radically simple IT automation system.&lt;br&gt;
It handles configuration management, application deployment, cloud provisioning, ad-hoc task execution, network automation, and multi-node orchestration.&lt;br&gt;
Ansible makes complex changes like zero-downtime rolling updates with load balancers easy.&lt;/p&gt;

&lt;p&gt;While Ansible leverages IaC, it uses SSH for its push nodes, so it's agentless.&lt;br&gt;
Ansible is very easy to use for its Playbooks are written in YAML that is readable by humans.&lt;/p&gt;

&lt;p&gt;The Design Principles of Ansible are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Have an extremely simple setup process with a minimal learning curve;&lt;/li&gt;
&lt;li&gt;Manage machines quickly and in parallel;&lt;/li&gt;
&lt;li&gt;Avoid custom agents and additional open ports, be agentless by leveraging the existing SSH daemon;&lt;/li&gt;
&lt;li&gt;Describe infrastructure in a language that is both machine and human-friendly;&lt;/li&gt;
&lt;li&gt;Focus on security and easy auditability/review/rewriting of content;&lt;/li&gt;
&lt;li&gt;Manage new remote machines instantly, without bootstrapping any software;&lt;/li&gt;
&lt;li&gt;Allow module development in any dynamic language, not just Python;&lt;/li&gt;
&lt;li&gt;Be usable as non-root;&lt;/li&gt;
&lt;li&gt;Be the easiest IT automation system to use, ever.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In a nutshell, Ansible is one of the most simple yet effective IT orchestration and configuration management tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  6、Helm
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/helm/helm" rel="noopener noreferrer"&gt;Helm Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Maybe you are already using Docker and Kubernetes, which are the basis of containerization.&lt;br&gt;
After that, you will need a mechanism to manage the Kubernetes resources. Yes, helm can help you to achieve this.&lt;/p&gt;

&lt;p&gt;Helm is a tool that streamlines installing and managing Kubernetes applications. Think of it like apt/yum/homebrew for Kubernetes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Helm renders your templates and communicates with the Kubernetes API.&lt;/li&gt;
&lt;li&gt;Helm runs on your laptop, CI/CD, or wherever you want it to run.&lt;/li&gt;
&lt;li&gt;Charts are Helm packages that contain at least two things:

&lt;ul&gt;
&lt;li&gt;A description of the package (Chart.yaml)&lt;/li&gt;
&lt;li&gt;One or more templates, which contain Kubernetes manifest files&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Charts can be stored on disk, or fetched from remote chart repositories (like Debian or RedHat packages)&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;You can use Helm to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Find and use popular software packaged as Helm Charts to run in Kubernetes;&lt;/li&gt;
&lt;li&gt;Share your own applications as Helm Charts;&lt;/li&gt;
&lt;li&gt;Create reproducible builds of your Kubernetes applications;&lt;/li&gt;
&lt;li&gt;Intelligently manage your Kubernetes manifest files;&lt;/li&gt;
&lt;li&gt;Manage releases of Helm packages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition, Helm is a CNCF graduated project.&lt;/p&gt;

&lt;h3&gt;
  
  
  7、Harbor
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/goharbor/harbor" rel="noopener noreferrer"&gt;Harbor Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Harbor is an open-source trusted cloud native registry project that stores, signs, and scans content.&lt;br&gt;
Harbor extends the open-source Docker Distribution by adding the functionalities usually required by users such as security, identity and management.&lt;br&gt;
Having a registry closer to the build-and-run environment can improve image transfer efficiency.&lt;br&gt;
Harbor supports the replication of images between registries and also offers advanced security features such as user management, access control and activity auditing.&lt;/p&gt;

&lt;p&gt;The 8 main features of Harbor:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloud native registry&lt;/strong&gt;: With support for both container images and &lt;a href="https://helm.sh" rel="noopener noreferrer"&gt;Helm&lt;/a&gt; charts, Harbor serves as a registry for cloud-native environments like container runtimes and orchestration platforms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Role-based access control&lt;/strong&gt;: Users access different repositories through 'projects' and a user can have different permission for images or Helm charts under a project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy-based replication&lt;/strong&gt;: Images and charts can be replicated (synchronized) between multiple registry instances based on policies with using filters (repository, tag and label).
Harbor automatically retries a replication if it encounters any errors. This can be used to assist load-balancing, achieve high availability, and facilitate multi-datacenter deployments in hybrid and multi-cloud scenarios.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vulnerability Scanning&lt;/strong&gt;: Harbor scans images regularly for vulnerabilities and has policy checks to prevent vulnerable images from being deployed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LDAP/AD support&lt;/strong&gt;: Harbor integrates with existing enterprise LDAP/AD for user authentication and management, and supports importing LDAP groups into Harbor that can then be given permissions to specific projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image deletion &amp;amp; garbage collection&lt;/strong&gt;: System admin can run garbage collection jobs so that images(dangling manifests and unreferenced blobs) can be deleted and their space can be freed up periodically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graphical user portal&lt;/strong&gt;: User can easily browse, search repositories and manage projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy deployment&lt;/strong&gt;: Harbor can be deployed via Docker compose as well Helm Chart, and a Harbor Operator was added recently as well.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Helm is a CNCF graduated project too.&lt;/p&gt;

&lt;h3&gt;
  
  
  8、Sonarqube
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/SonarSource/sonarqube" rel="noopener noreferrer"&gt;Sonarqube Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SonarQube empowers developers to write cleaner and safer code.&lt;br&gt;
It can catch tricky bugs to prevent undefined behavior from impacting end-users and make sure your codebase is clean and maintainable, to increase developer velocity.&lt;/p&gt;

&lt;p&gt;You can integrate Sonarqube scanning into the Jenkins/Tekton Pipeline to catch code issues as they occur in the CI process.&lt;/p&gt;

&lt;h3&gt;
  
  
  9、Prometheus
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/prometheus/prometheus" rel="noopener noreferrer"&gt;Prometheus Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Prometheus is the second graduated project of CNCF. It is a systems and service monitoring system.&lt;br&gt;
It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results,&lt;br&gt;
and can trigger alerts when specified conditions are observed.&lt;/p&gt;

&lt;p&gt;The features that distinguish Prometheus from other metrics and monitoring systems are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A multi-dimensional data model (time series defined by metric name and set of key/value dimensions);&lt;/li&gt;
&lt;li&gt;PromQL, a powerful and flexible query language to leverage this dimensionality;&lt;/li&gt;
&lt;li&gt;No dependency on distributed storage; single server nodes are autonomous;&lt;/li&gt;
&lt;li&gt;An HTTP pull model for time series collection;&lt;/li&gt;
&lt;li&gt;Pushing time series is supported via an intermediary gateway for batch jobs;&lt;/li&gt;
&lt;li&gt;Targets are discovered via service discovery or static configuration;&lt;/li&gt;
&lt;li&gt;Multiple modes of graphing and dashboarding support;&lt;/li&gt;
&lt;li&gt;Support for hierarchical and horizontal federation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  10、DevStream
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/devstream-io/devstream" rel="noopener noreferrer"&gt;DevStream Source Code Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We've gone through 9 DevOps tools, and maybe at this moment you are thinking that DevOps tools are too much and these make you feel overwhelmed.&lt;br&gt;
Maybe you wish you could have an open-source tool to help you manage those DevOps tools. You choose the best DevOps tools that you love,&lt;br&gt;
then one tool could take care of the rest. Ok, DevStream do is it.&lt;/p&gt;

&lt;p&gt;DevStream is a DevOps toolchain manager. It can help you to kick off DevOps quickly and easily.&lt;/p&gt;

&lt;p&gt;With DevStream, you can define your desired DevOps tools in a single human-readable YAML config file, and at the press of a button (one single command),&lt;br&gt;
you will have your whole DevOps toolchain and SDLC workflow set up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;At the last, I have to tell you some more bit about the DevOps tools I mentioned above. They are the top 10 tools just in my mind.&lt;br&gt;
If you have a different "top 10" idea, that's fine.&lt;br&gt;
I also welcome you to post your "top 10" in the comment section below.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>devstream</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Getting Started with minikube</title>
      <dc:creator>Daniel Hu</dc:creator>
      <pubDate>Sat, 23 Apr 2022 15:22:39 +0000</pubDate>
      <link>https://dev.to/devstream/getting-started-with-minikube-5c61</link>
      <guid>https://dev.to/devstream/getting-started-with-minikube-5c61</guid>
      <description>&lt;p&gt;What’s up guys, this is Daniel! Yeah, this English blog is WRITTEN by me, not TRANSLATED by me! It’s my first English blog in my whole life. If you are a Chinese reader, maybe you’ve ever seen my Chinese blogs before. Right, I wrote a lot of blogs, but only in Chinese. Believe it or not, English isn’t my strong suit. But I want to have a try today and I’ll do my best. Let’s get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Will Talk about Today
&lt;/h2&gt;

&lt;p&gt;If you ask me how to create a local Kubernetes cluster, I'll tell you &lt;a href="https://kind.sigs.k8s.io"&gt;Kind&lt;/a&gt;, &lt;a href="https://minikube.sigs.k8s.io/docs/"&gt;minikube&lt;/a&gt;, and &lt;a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/"&gt;Kubeadm&lt;/a&gt; are all good choices. If you ask me which tool is the most recommended for beginners, my answer must be &lt;code&gt;minikube&lt;/code&gt; or &lt;code&gt;Kind&lt;/code&gt;. &lt;code&gt;minikube&lt;/code&gt; is more powerful than &lt;code&gt;Kind&lt;/code&gt;, and &lt;code&gt;Kind&lt;/code&gt; is easier than &lt;code&gt;minikube&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In my previous article, I walked you guys through "How to Create a Local Kubernetes Cluster from the Ground Up" with &lt;code&gt;Kind&lt;/code&gt;. If you are interested, here's a quick link for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.devstream.io/blog/local-k8s-with-kind#install-docker"&gt;Creating a Local Kubernetes Cluster from the Ground Up&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You might ask why that article is written by &lt;a href="https://github.com/IronCore864"&gt;Tiexin Guo&lt;/a&gt;, not me. Of course! As I said in the beginning, this blog you are reading now is my first English blog. So, technically, the one above isn’t “my” article, but I did write the Chinese version of it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.devstream.io/zh/blog/local-k8s-with-kind"&gt;从零开始快速搭建本地 Kubernetes 测试环节&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both &lt;code&gt;minikube&lt;/code&gt; and &lt;code&gt;Kind&lt;/code&gt; are the most well-known and popular choices to run a Kubernetes environment on a local computer. Since I've shown you how to use &lt;code&gt;Kind&lt;/code&gt;, I might as well introduce &lt;code&gt;minikube&lt;/code&gt; to youadorable today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start with &lt;code&gt;minikube&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;minikube&lt;/code&gt; is a command-line tool like &lt;code&gt;Kind&lt;/code&gt; that you can use to create and configure Kubernetes clusters locally on your computer. &lt;/p&gt;

&lt;h3&gt;
  
  
  How to Install &lt;code&gt;minikube&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;If your computer is the same as mine, Mac with m1 chip, you can install the latest &lt;code&gt;minikube&lt;/code&gt; stable release in 2 steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-LO&lt;/span&gt; https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-arm64
&lt;span class="nb"&gt;sudo install &lt;/span&gt;minikube-darwin-arm64 /usr/local/bin/minikube
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you are using &lt;code&gt;Homebrew&lt;/code&gt;, just one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;minikube
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your computer is of other platforms or architectures, see the “Installation” section in &lt;a href="https://minikube.sigs.k8s.io/docs/start/"&gt;minikube start&lt;/a&gt; for more details.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;minikube start&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Like the section title we used here, to start using minikube, run &lt;code&gt;minikube start&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;minikube start
😄  minikube v1.25.2 on Darwin 12.2.1 &lt;span class="o"&gt;(&lt;/span&gt;arm64&lt;span class="o"&gt;)&lt;/span&gt;
👎  Unable to pick a default driver. Here is what was considered, &lt;span class="k"&gt;in &lt;/span&gt;preference order:
    ▪ docker: Not healthy: &lt;span class="s2"&gt;"docker version --format {{.Server.Os}}-{{.Server.Version}}"&lt;/span&gt; &lt;span class="nb"&gt;exit &lt;/span&gt;status 1: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    ▪ docker: Suggestion: Start the Docker service &amp;lt;https://minikube.sigs.k8s.io/docs/drivers/docker/&amp;gt;
💡  Alternatively you could &lt;span class="nb"&gt;install &lt;/span&gt;one of these drivers:
    ▪ hyperkit: Not installed: &lt;span class="nb"&gt;exec&lt;/span&gt;: &lt;span class="s2"&gt;"hyperkit"&lt;/span&gt;: executable file not found &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$PATH&lt;/span&gt;
    ▪ parallels: Not installed: &lt;span class="nb"&gt;exec&lt;/span&gt;: &lt;span class="s2"&gt;"prlctl"&lt;/span&gt;: executable file not found &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$PATH&lt;/span&gt;
    ▪ vmware: Not installed: &lt;span class="nb"&gt;exec&lt;/span&gt;: &lt;span class="s2"&gt;"docker-machine-driver-vmware"&lt;/span&gt;: executable file not found &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$PATH&lt;/span&gt;
    ▪ virtualbox: Not installed: unable to find VBoxManage &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$PATH&lt;/span&gt;
    ▪ podman: Not installed: &lt;span class="nb"&gt;exec&lt;/span&gt;: &lt;span class="s2"&gt;"podman"&lt;/span&gt;: executable file not found &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$PATH&lt;/span&gt;

❌  Exiting due to DRV_DOCKER_NOT_RUNNING: Found docker, but the docker service isn&lt;span class="s1"&gt;'t running. Try restarting the docker service.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ok, it doesn’t matter; we need to install Docker. In my previous article &lt;a href="https://www.devstream.io/blog/local-k8s-with-kind#install-docker"&gt;How to Create a Local Kubernetes Cluster from the Ground Up&lt;/a&gt;, I introduced how to "Install Docker".&lt;/p&gt;

&lt;p&gt;After the Docker is installed, what we'll need in total?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A not too bad computer;&lt;/li&gt;
&lt;li&gt;Internet connections;&lt;/li&gt;
&lt;li&gt;Container or virtual machine hypervisor, such as: Docker, Hyper-V, KVM, VirtualBox, or VMware Workstation ...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's try to run &lt;code&gt;minikube start&lt;/code&gt; again. This command is time-consuming the first time you use it, especially if the network speed is low. Feel free to have a cup of coffee then come back to see the result.&lt;/p&gt;

&lt;p&gt;2000 years later...&lt;/p&gt;

&lt;p&gt;Well Done! 0 error, 0 warning! The logs are beautiful!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;minikube start
😄  minikube v1.25.2 on Darwin 12.2.1 &lt;span class="o"&gt;(&lt;/span&gt;arm64&lt;span class="o"&gt;)&lt;/span&gt;
✨  Automatically selected the docker driver
👍  Starting control plane node minikube &lt;span class="k"&gt;in &lt;/span&gt;cluster minikube
🚜  Pulling base image ...
💾  Downloading Kubernetes v1.23.3 preload ...
    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; preloaded-images-k8s-v17-v1...: 419.07 MiB / 419.07 MiB  100.00% 8.54 MiB
    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; index.docker.io/kicbase/sta...: 28.23 MiB / 343.12 MiB  8.23% 1.34 MiB p/
    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; index.docker.io/kicbase/sta...: 343.12 MiB / 343.12 MiB  100.00% 3.77 MiB
❗  minikube was unable to download gcr.io/k8s-minikube/kicbase:v0.0.30, but successfully downloaded docker.io/kicbase/stable:v0.0.30 as a fallback image
🔥  Creating docker container &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;CPUs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2, &lt;span class="nv"&gt;Memory&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3885MB&lt;span class="o"&gt;)&lt;/span&gt; ...
🐳  Preparing Kubernetes v1.23.3 on Docker 20.10.12 ...
    ▪ kubelet.housekeeping-interval&lt;span class="o"&gt;=&lt;/span&gt;5m
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass

❗  /usr/local/bin/kubectl is version 1.21.5, which may have incompatibilites with Kubernetes 1.23.3.
    ▪ Want kubectl v1.23.3? Try &lt;span class="s1"&gt;'minikube kubectl -- get pods -A'&lt;/span&gt;
🏄  Done! kubectl is now configured to use &lt;span class="s2"&gt;"minikube"&lt;/span&gt; cluster and &lt;span class="s2"&gt;"default"&lt;/span&gt; namespace by default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Access Your Shiny Kubernetes Cluster
&lt;/h3&gt;

&lt;p&gt;Do you have &lt;code&gt;kubectl&lt;/code&gt; installed? If yes, you can now use it to access your shiny Kubernetes cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get pod &lt;span class="nt"&gt;-A&lt;/span&gt;
NAMESPACE     NAME                               READY   STATUS    RESTARTS        AGE
kube-system   coredns-64897985d-hdmqd            1/1     Running   0               3m10s
kube-system   etcd-minikube                      1/1     Running   0               3m24s
kube-system   kube-apiserver-minikube            1/1     Running   0               3m25s
kube-system   kube-controller-manager-minikube   1/1     Running   0               3m25s
kube-system   kube-proxy-nkzmn                   1/1     Running   0               3m10s
kube-system   kube-scheduler-minikube            1/1     Running   0               3m23s
kube-system   storage-provisioner                1/1     Running   1 &lt;span class="o"&gt;(&lt;/span&gt;2m40s ago&lt;span class="o"&gt;)&lt;/span&gt;   3m22s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, &lt;code&gt;minikube&lt;/code&gt; can download the appropriate version of &lt;code&gt;kubectl&lt;/code&gt; with the command &lt;code&gt;minikube kubectl&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;minikube kubectl &lt;span class="nt"&gt;--&lt;/span&gt; get pod &lt;span class="nt"&gt;-A&lt;/span&gt;
    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; kubectl.sha256: 64 B / 64 B &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--------------------------&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; 100.00% ? p/s 0s
    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; kubectl: 52.82 MiB / 52.82 MiB &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--------------&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; 100.00% 6.04 MiB p/s 8.9s
NAMESPACE     NAME                               READY   STATUS    RESTARTS       AGE
kube-system   coredns-64897985d-hdmqd            1/1     Running   0              4m32s
kube-system   etcd-minikube                      1/1     Running   0              4m46s
kube-system   kube-apiserver-minikube            1/1     Running   0              4m47s
kube-system   kube-controller-manager-minikube   1/1     Running   0              4m47s
kube-system   kube-proxy-nkzmn                   1/1     Running   0              4m32s
kube-system   kube-scheduler-minikube            1/1     Running   0              4m45s
kube-system   storage-provisioner                1/1     Running   1 &lt;span class="o"&gt;(&lt;/span&gt;4m2s ago&lt;span class="o"&gt;)&lt;/span&gt;   4m44s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cooooool!&lt;/p&gt;

&lt;p&gt;Are you thinking this command is too complicated? Use the config below and you'll be happy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;kubectl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"minikube kubectl --"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'm used to command-line to access the Kubernetes cluster. Yes, I never use the Kubernetes Dashboard. But if you like to have some insight into your cluster state with a Dashboard, &lt;code&gt;minikube&lt;/code&gt; bundles it for you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;minikube dashboard
🔌  Enabling dashboard ...
    ▪ Using image kubernetesui/dashboard:v2.3.1
    ▪ Using image kubernetesui/metrics-scraper:v1.0.7
🤔  Verifying dashboard health ...
🚀  Launching proxy ...
🤔  Verifying proxy health ...
🎉  Opening http://127.0.0.1:51801/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ &lt;span class="k"&gt;in &lt;/span&gt;your default browser...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this time, your browser will automatically open a new tab, and the Dashboard will soon show up:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o7pdv2c2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u0hix1h7jt5zcodfeeme.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o7pdv2c2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u0hix1h7jt5zcodfeeme.png" alt="Dashboard" width="880" height="550"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploy an Application in Your Shiny Kubernetes Cluster
&lt;/h3&gt;

&lt;p&gt;Let’s create a sample deployment with the image &lt;code&gt;preslavmihaylov/kubehelloworld:latest&lt;/code&gt; and expose it on port 3000.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://minikube.sigs.k8s.io/docs/start/"&gt;minikube start&lt;/a&gt; told us to use the &lt;code&gt;k8s.gcr.io/echoserver:1.4&lt;/code&gt; to launch the &lt;code&gt;hello-minikube&lt;/code&gt; application, but it'll fail on a Mac with m1 chip. See &lt;a href="https://github.com/kubernetes/minikube/issues/11107"&gt;this issue&lt;/a&gt; for more details.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl create deployment sample-deploy &lt;span class="nt"&gt;--image&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;preslavmihaylov/kubehelloworld:latest
deployment.apps/sample-deploy created
&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl expose deployment sample-deploy &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;NodePort &lt;span class="nt"&gt;--port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3000
service/sample-deploy exposed
&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get pod
NAME                             READY   STATUS    RESTARTS   AGE
sample-deploy-795887588d-flkgb   1/1     Running   0          50s
&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get svc
NAME            TYPE        CLUSTER-IP     EXTERNAL-IP   PORT&lt;span class="o"&gt;(&lt;/span&gt;S&lt;span class="o"&gt;)&lt;/span&gt;          AGE
kubernetes      ClusterIP   10.96.0.1      &amp;lt;none&amp;gt;        443/TCP          66m
sample-deploy   NodePort    10.107.59.38   &amp;lt;none&amp;gt;        3000:32631/TCP   43s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we can use &lt;code&gt;kubectl&lt;/code&gt; to forward the port:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl port-forward service/sample-deploy 3000:3000
Forwarding from 127.0.0.1:3000 -&amp;gt; 3000
Forwarding from &lt;span class="o"&gt;[&lt;/span&gt;::1]:3000 -&amp;gt; 3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the browser, visit &lt;code&gt;localhost:3000&lt;/code&gt;, and "Hello World!" will soon show up.&lt;/p&gt;

&lt;p&gt;Another way to access this service is to use the &lt;code&gt;minikube service sample-deploy&lt;/code&gt; command and minikube will launch a browser page for you with the right &lt;code&gt;url:port&lt;/code&gt; address.&lt;/p&gt;

&lt;p&gt;And we can use the command &lt;code&gt;minikube tunnel&lt;/code&gt; to use the &lt;code&gt;LoadBalancer&lt;/code&gt; type Service. Here is an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl delete service sample-deploy
service &lt;span class="s2"&gt;"sample-deploy"&lt;/span&gt; deleted
&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl expose deployment sample-deploy &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;LoadBalancer &lt;span class="nt"&gt;--port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3000
service/sample-deploy exposed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In another terminal window, start the tunnel to create a routable IP with the command &lt;code&gt;minikube tunnel&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;minikube tunnel
✅  Tunnel successfully started

📌  NOTE: Please &lt;span class="k"&gt;do &lt;/span&gt;not close this terminal as this process must stay alive &lt;span class="k"&gt;for &lt;/span&gt;the tunnel to be accessible ...

🏃  Starting tunnel &lt;span class="k"&gt;for &lt;/span&gt;service sample-deploy.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can use the &lt;code&gt;EXTERNAL-IP&lt;/code&gt; to access the Service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get svc
NAME            TYPE           CLUSTER-IP      EXTERNAL-IP   PORT&lt;span class="o"&gt;(&lt;/span&gt;S&lt;span class="o"&gt;)&lt;/span&gt;          AGE
kubernetes      ClusterIP      10.96.0.1       &amp;lt;none&amp;gt;        443/TCP          86m
sample-deploy   LoadBalancer   10.96.205.167   127.0.0.1     3000:31945/TCP   28s
&lt;span class="nv"&gt;$ &lt;/span&gt;curl 127.0.0.1:3000
Hello World!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to Manage the Cluster
&lt;/h2&gt;

&lt;p&gt;I'll show you some commands here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;minikube pause&lt;/code&gt; # Pause Kubernetes cluster without impacting any deployed resources.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minikube unpause&lt;/code&gt; # Unpause the Paused Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minikube stop&lt;/code&gt; # Remember the &lt;code&gt;minikube start&lt;/code&gt;? Need I say more?&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minikube config set memory 20480&lt;/code&gt; # Change the default memory limit (requires a restart).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minikube addons list&lt;/code&gt; # Browse the easily installed Kubernetes addons catalog.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minikube start -p aged --kubernetes-version=v1.16.1&lt;/code&gt; # Create a second cluster running an older Kubernetes version.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minikube delete --all&lt;/code&gt; # Yeah, delete all, delete anything, delete all clusters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's all?&lt;/p&gt;

&lt;p&gt;No! But if you want to know them all, I'll show you the &lt;a href="https://minikube.sigs.k8s.io/docs/commands/"&gt;command docs here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Push Images into a &lt;code&gt;minikube&lt;/code&gt; Cluster
&lt;/h2&gt;

&lt;p&gt;There are about 8 ways you can use to push images into a &lt;code&gt;minikube&lt;/code&gt; cluster. And I'll show you the most useful two ways today.&lt;/p&gt;

&lt;h3&gt;
  
  
  Push Images with the &lt;code&gt;cache&lt;/code&gt; Command
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;minikube cache add [flags] [options]&lt;/code&gt; # Add an image to local cache.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cache? Yes, the image will be cached by minikube and automatically pushed into all clusters, not like the &lt;code&gt;Kind&lt;/code&gt; method: &lt;code&gt;kind load docker-image &amp;lt;IMAGE&amp;gt; [IMAGE...] [flags]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let's see how many sub-commands &lt;code&gt;cache&lt;/code&gt; has:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;minikube cache &lt;span class="nt"&gt;-h&lt;/span&gt;
Add, delete, or push a &lt;span class="nb"&gt;local &lt;/span&gt;image into minikube

Available Commands:
  add         Add an image to &lt;span class="nb"&gt;local &lt;/span&gt;cache.
  delete      Delete an image from the &lt;span class="nb"&gt;local &lt;/span&gt;cache.
  list        List all available images from the &lt;span class="nb"&gt;local &lt;/span&gt;cache.
  reload      reload cached images.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Easy, isn't it?&lt;/p&gt;

&lt;p&gt;The only sub-command we need to talk about might be &lt;code&gt;reload&lt;/code&gt;. If your image changed after you had cached it, you need to execute &lt;code&gt;minikube cache reload [flags] [options]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;E.g.:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;minikube cache add alpine:latest&lt;/code&gt; # Cache alpine:latest for all clusters.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minikube cache reload alpine:latest&lt;/code&gt; # Reload alpine:latest if it's changed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minikube cache list&lt;/code&gt; # Display what images we have added to the cache.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minikube cache delete alpine:latest&lt;/code&gt; # Just delete alpine:latest&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pushing Directly to the In-Cluster Docker Daemon
&lt;/h3&gt;

&lt;p&gt;If the image we want to use inside the &lt;code&gt;minikube&lt;/code&gt; cluster is built locally instead of pulled from a registry, we can reuse the Docker daemon inside the &lt;code&gt;minikube&lt;/code&gt; cluster. Yeah, we don’t have to build the image on our host machine and &lt;code&gt;cache&lt;/code&gt; it; we can just build inside the same docker daemon inside the &lt;code&gt;minikube&lt;/code&gt; cluster.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;docker ps
CONTAINER ID   IMAGE                    COMMAND                  CREATED       STATUS       PORTS                                                                                                                                  NAMES
170fe8252660   kicbase/stable:v0.0.30   &lt;span class="s2"&gt;"/usr/local/bin/entr…"&lt;/span&gt;   6 hours ago   Up 6 hours   127.0.0.1:50981-&amp;gt;22/tcp, 127.0.0.1:50982-&amp;gt;2376/tcp, 127.0.0.1:50984-&amp;gt;5000/tcp, 127.0.0.1:50985-&amp;gt;8443/tcp, 127.0.0.1:50983-&amp;gt;32443/tcp   minikube

&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;minikube docker-env&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;docker ps
CONTAINER ID   IMAGE                            COMMAND                  CREATED       STATUS       PORTS     NAMES
de4fedaf4ef0   preslavmihaylov/kubehelloworld   &lt;span class="s2"&gt;"docker-entrypoint.s…"&lt;/span&gt;   5 hours ago   Up 5 hours             k8s_kubehelloworld_sample-deploy-795887588d-flkgb_default_2e6b194a-bdc7-44cc-b455-91959a4206a9_0
d45474ce1888   k8s.gcr.io/pause:3.6             &lt;span class="s2"&gt;"/pause"&lt;/span&gt;                 5 hours ago   Up 5 hours             k8s_POD_sample-deploy-795887588d-flkgb_default_2e6b194a-bdc7-44cc-b455-91959a4206a9_0
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What happened?&lt;/p&gt;

&lt;p&gt;After the command &lt;code&gt;eval $(minikube docker-env)&lt;/code&gt; is executed, &lt;code&gt;docker&lt;/code&gt; accesses the docker daemon inside the &lt;code&gt;minikube&lt;/code&gt; cluster! What's the secret with &lt;code&gt;minikube docker-env&lt;/code&gt; command? Let's dig into it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;minikube docker-env
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;DOCKER_TLS_VERIFY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"1"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;DOCKER_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"tcp://127.0.0.1:50982"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;DOCKER_CERT_PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/Users/danielhu/.minikube/certs"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;MINIKUBE_ACTIVE_DOCKERD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"minikube"&lt;/span&gt;

&lt;span class="c"&gt;# To point your shell to minikube's docker-daemon, run:&lt;/span&gt;
&lt;span class="c"&gt;# eval $(minikube -p minikube docker-env)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I don't think I need to explain more about what happened. And we can &lt;code&gt;build&lt;/code&gt; against the Docker inside &lt;code&gt;minikube&lt;/code&gt; now. Just execute a command like &lt;code&gt;docker build -t my-image:latest .&lt;/code&gt;, &lt;code&gt;my-image:latest&lt;/code&gt; is instantly accessible to the Kubernetes cluster. &lt;/p&gt;

&lt;h2&gt;
  
  
  How to …
&lt;/h2&gt;

&lt;p&gt;Oops, there are many how-tos we could talk about, but I believe that you can start using &lt;code&gt;minikube&lt;/code&gt; now. Maybe I'll talk about more how-tos next time. If you want to dive into &lt;code&gt;minikube&lt;/code&gt; now, go ahead and study the &lt;a href="https://minikube.sigs.k8s.io/docs/"&gt;official documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Cool, I finished writing this blog, It's like opening Pandora's box; I love this feeling. Of course, I know this blog is at the primary-school-student level, but I believe I can do better and better.&lt;/p&gt;

&lt;p&gt;Don’t forget to give a Like, Comment, and Subscribe! I’ll see you in the next article!&lt;/p&gt;

</description>
      <category>minikube</category>
      <category>kubernetes</category>
      <category>devstream</category>
    </item>
  </channel>
</rss>
