Зарегистрируйтесь сейчас для лучшей персонализированной цитаты!

Новости по теме

Quick Start: Prep Your Dev Environment for Kubernetes

29 июля 2022 г Hi-network.com

Getting started on a new platform, especially containers and Kubernetes, can appear overwhelming. But with the right setup and tools, you're much more likely to get ramped up quickly. Let's take a look at a good lineup of tools to install on your developer environment to get started with Kubernetes.

All of the tools used listed here are tested and run Windows 10 Pro, MacOS Monterey, and Ubuntu 20.04. They should also work with other Linux operating systems.

First step: A package manager

Get a package manager. If you are on Windows or Mac and you are not using one, you are missing out. A package manager is the beginning of a straightforward and clear developer experience.

None of the tools I mention in this storyneed | | | a package manager for installation, however my experience as a software engineer says that having a package manager makes installing tools a lot easier. If you are on Windows 10, I recommend the Chocolatey package manager. See my previous post, Installing Chocolatey on Windows 10. On MacOS, I recommend homebrew. if you are on a desktop Linux you should already have one preinstalled; on Ubuntu and Debian it's called apt.

So what are we going to install with our package manager? Here's the setup:

Rancher Desktop

The first thing to install is Rancher Desktop, which is in version 1.2.1 as of writing. Rancher desktop provides a slim GUI and installs Kubernetes and necessary CLI tools on your desktop to be able to interact with Kubernetes and build container images. It allows you to change versions of Kubernetes and is fully open source. It is Kubernetes' first development tool.

The useful Rancher Desktop.

Alternative: You could install Docker Desktop with Kubernetes, but it's pay to play for medium and large orgs and you can't switch around to different Kubernetes versions like you can with Rancher Desktop. I personally have switched over to Rancher Desktop to do more with open source projects for building container images and working with Kubernetes. However, Docker Desktop has a great GUI, integrated developer environments within containers, and it comes with the standard Docker CLI. Either one is a good option.

Visual Studio Code

Next up is Visual Studio Code. VSCode provides a great developer experience for editing code, and there are a lot of extensions to help developers with their code, or working with Kubernetes and containers in general. Plus you have a terminal window in VSCode IDE that makes it easier to interact with Kubernetes and those shiny new CLI tools that Rancher Desktop installed above.

Git

After you get the VS Code text editor, it is time to install Git to manage source code. This is important for any applications or configurations you plan to manage.

Handy Kubernetes Tools

Next I advise  a couple of CLI tools that just make interacting with Kubernetes and the Kubernetes CLI (kubectl) easier. The tools are kubectx for changing which Kubernetes cluster you are working with, and kubens, which helps change the namespace you are working with within your current kubernetes cluster. They save you time because they help to shorten your length of commands and make Kubernetes a lot easier to manage from the command line.

The tools are open source and the code can be found in the same repo. Pick the appropriate installation of kubectx and kubens for your Desktop or Dev machine, unzip/untar the file and then from the contents of the zip/tar file, install the binary as appropriate for your computer.

Or iIf you have one of those package managers I recommended above,  you can use them with these commands:

MacOS:

brew install kubectx

Windows:

choco install kubens kubectx

Ubuntu/Debian:

sudo apt install kubectx

The tools I discuss in this article are a good base for a solid container and Kubernetes Dev environment. Happy deving!

Related resources

  • Cisco DevNet Learning Lab: Introduction to Containers
  • Cisco DevNet Learning Lab: Introduction to Kubernetes

 


We'd love to hear what you think. Ask a question or leave a comment below.
And stay connected with Cisco DevNet on social!

LinkedIn | Twitter @CiscoDevNet | Facebook | YouTube Channel


tag-icon Горячие метки: containers docker Kuberbetes enterprise developer

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.
Our company's operations and information are independent of the manufacturers' positions, nor a part of any listed trademarks company.