<?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: Anthony Vinicius</title>
    <description>The latest articles on DEV Community by Anthony Vinicius (@anthonyvii).</description>
    <link>https://dev.to/anthonyvii</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%2F521662%2F2d86c6c2-9f3e-457b-a6de-e69ddfb4733c.png</url>
      <title>DEV Community: Anthony Vinicius</title>
      <link>https://dev.to/anthonyvii</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anthonyvii"/>
    <language>en</language>
    <item>
      <title>Be a better developer with these Git good practices</title>
      <dc:creator>Anthony Vinicius</dc:creator>
      <pubDate>Fri, 16 Feb 2024 20:44:23 +0000</pubDate>
      <link>https://dev.to/basementdevs/be-a-better-developer-with-these-git-good-practices-2dim</link>
      <guid>https://dev.to/basementdevs/be-a-better-developer-with-these-git-good-practices-2dim</guid>
      <description>&lt;p&gt;If you're a developer, you probably use the versioning system called Git on a daily basis. The use of this tool is crucial for the development process of an application, whether working in a team or individually. However, it's common to encounter messy repositories, commits with unclear messages that don't convey useful information, and misuse of branches, among other issues. Knowing how to use Git correctly and following good practices is essential for those who want to excel in the job market.&lt;/p&gt;




&lt;h2&gt;
  
  
  Table of contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Naming Conventions for Git Branches&lt;/li&gt;
&lt;li&gt;Branch Names Convention Prefixes&lt;/li&gt;
&lt;li&gt;Commit Message&lt;/li&gt;
&lt;li&gt;Conventional Commit's&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Naming Conventions for Git Branches&lt;a id="naming-conventions"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;When we're working with code versioning, one of the main good practices that we should follow is using clear and descriptive names for branches, commits, pull requests, etc. Ensuring a concise workflow for all team members is essential. In addition to gaining productivity, documenting the development process of the project historically simplifies teamwork. By following these practices, you'll see benefits soon.&lt;/p&gt;

&lt;p&gt;Based on it, the community created a branch naming convention that you can follow in your project. The use of the following items below is optional, but they can help improve your development skills.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Lowercase:&lt;/strong&gt; Don't use uppercase letters in the branch name, stick to lowercase;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Hyphen separated:&lt;/strong&gt; If your branch name consists of more than one word, separate them with a hyphen. following the kebab-case convention. Avoid PascalCase, camelCase, or snake_case;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. (a-z, 0-9):&lt;/strong&gt; Use only alphanumeric characters and hyphens in your branch name. Avoid any non-alphanumeric character;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Please, don't use continuous hyphens (--).&lt;/strong&gt; This practice can be confusing. For example, if you have branch types (such as a feature, bugfix, hotfix, etc.), use a slash (/) instead;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Avoid ending your branch name with a hyphen&lt;/strong&gt;. It does not make sense because a hyphen separates words, and there's no word to separate at the end;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. This practice is the most important:&lt;/strong&gt; Use descriptive, concise, and clear names that explain what was done on the branch;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong branch names&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;fixSidebar&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;feature-new-sidebar-&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;FeatureNewSidebar&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;feat_add_sidebar&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Good branch names&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;feature/new-sidebar&lt;/li&gt;
&lt;li&gt;add-new-sidebar&lt;/li&gt;
&lt;li&gt;hotfix/interval-query-param-on-get-historical-data&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Branch Names Convention Prefixes&lt;a id="branch-names"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Sometimes the purpose of a branch isn't clear. It could be a new feature, a bug fix, documentation updates, or anything else. To address this, it's a common practice to use a prefix on the branch name to quickly explain the purpose of the branch.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;feature:&lt;/strong&gt; It conveys a new feature that will be developed. For example, &lt;code&gt;feature/add-filters&lt;/code&gt;;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;release:&lt;/strong&gt; Used to prepare a new release. The prefix &lt;code&gt;release/&lt;/code&gt; is commonly used to do tasks such as last touched and revisions before merging the new updates from the branch master to create a release. For example, &lt;code&gt;release/v3.3.1-beta&lt;/code&gt;;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;bugfix:&lt;/strong&gt; It conveys that you're solving a bug in the code and it's usually related to an issue. For instance, &lt;code&gt;bugfix/sign-in-flow&lt;/code&gt;;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;hotfix:&lt;/strong&gt; Similar to bugfix, but it is related to fixing a critical bug present in the production environment. For example, &lt;code&gt;hotfix/cors-error&lt;/code&gt;;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;docs:&lt;/strong&gt; To write some documentation. For example, &lt;code&gt;docs/quick-start&lt;/code&gt;;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're working in a workflow with task management, like Jira, Trello, ClickUp, or any similar tool that can create User Stories, each card has a number associated. So, is commonly use these card numbers on the prefix of branch names. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;feature/T-531-add-sidebar&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docs/T-789-update-readme&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;hotfix/T-142-security-path&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Commit Message&lt;a id="commit-message"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Let's go talk about commit messages. Unfortunately, is so easy to find projects with commit messages like "added a lot of things" or "Pikachu, I choose you"... Yeah, I once found a project where the commit messages were related to a Pokémon fight.&lt;/p&gt;

&lt;p&gt;Commit messages are really important in the development process. Creating a good history will help you a lot of times in your journey. Like branches, commits also have conventions created by the community, which you can learn about below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A commit message has three important sections: Subject, Description, and Footer. The subject of a commit is required and defines the purpose of a commit. The description (body) is used to provide additional context and explanation for the commit's purpose. Lastly, there's the footer, commonly used for metadata like assigning a commit. While utilizing both the description and footer is considered a good practice, it's not required.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use the imperative mood in the subject line.&lt;/strong&gt; For example: &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Add README.md&lt;/code&gt; ✅;&lt;br&gt;
&lt;code&gt;Added README.md&lt;/code&gt; ❌;&lt;br&gt;
&lt;code&gt;Adding README.md&lt;/code&gt; ❌;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Capitalize the first letter of the subject line.&lt;/strong&gt; For example:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Add user authentication&lt;/code&gt; ✅;&lt;br&gt;
&lt;code&gt;add user authentication&lt;/code&gt; ❌;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Don't end the subject line with a period.&lt;/strong&gt; For example:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Update unit tests&lt;/code&gt; ✅;&lt;br&gt;
&lt;code&gt;Update unit tests.&lt;/code&gt; ❌;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Limit the subject line to &lt;strong&gt;50 characters&lt;/strong&gt;, i.e., be clear and concise;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wrap the body at &lt;strong&gt;72 characters&lt;/strong&gt; and separate the subject from a &lt;strong&gt;blank line&lt;/strong&gt;;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If your body of commit has more than one paragraph, so &lt;strong&gt;use blank lines to separate them&lt;/strong&gt;;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If necessary, use &lt;strong&gt;bullet points&lt;/strong&gt; instead of only paragraphs;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conventional Commit's&lt;a id="conventional-commits"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;"The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The quote below was obtained from the Conventional Commit's official website. This specification is the most used convention to commit messages in the community. &lt;/p&gt;

&lt;h3&gt;
  
  
  Structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;type&amp;gt;[optional scope]: &amp;lt;description&amp;gt;

[optional body]

[optional footer(s)]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Commit Type
&lt;/h3&gt;

&lt;p&gt;The first structure that we have to study is the commit type. It provides a clear context about what's done in this commit. Below you can see the list of commit types and when to use them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;feat:&lt;/strong&gt; Introductions of new functionalities;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;fix:&lt;/strong&gt; Rectifications of software bugs;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;refactor:&lt;/strong&gt; Employed for code alterations preserving its overall functionality;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;chore:&lt;/strong&gt; Updates not impacting production code, involving tool, config, or library adjustments;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;docs:&lt;/strong&gt; Additions or modifications to documentation files;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;perf:&lt;/strong&gt; Code changes enhancing performance;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;style:&lt;/strong&gt; Adjustments related to code presentation, like formatting and whitespace;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;test:&lt;/strong&gt; Inclusion or correction of tests;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;build:&lt;/strong&gt; Modifications affecting the build system or external dependencies;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ci:&lt;/strong&gt; Alterations to CI configuration files and scripts;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;env:&lt;/strong&gt; Describes adjustments or additions to configuration files within CI processes, such as container configuration parameters.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Scope
&lt;/h3&gt;

&lt;p&gt;A scope is a structure that can be added after the commit's type to provide additional contextual information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;fix(ui): resolve issue with button alignment&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;feat(auth): implement user authentication&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Body
&lt;/h3&gt;

&lt;p&gt;The body of a commit message provides detailed explanations about the changes introduced by the commit. It's typically added after a blank line following the subject line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Add new functionality to handle user authentication.

This commit introduces a new module to manage user authentication. It includes
functions for user login, registration, and password recovery.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Footer
&lt;/h3&gt;

&lt;p&gt;The footer of a commit message is used to provide additional information related to the commit. This can include details such as who reviewed or approved the changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Signed-off-by: John &amp;lt;john.doe@example.com&amp;gt;
Reviewed-by: Anthony &amp;lt;anthony@example.com&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Breaking Change
&lt;/h3&gt;

&lt;p&gt;Indicate that the commit includes significant changes that may lead to compatibility issues or require modifications in dependent code. You can add a &lt;code&gt;BREAKING CHANGE&lt;/code&gt; in the footer or include &lt;code&gt;!&lt;/code&gt; after the type/scope.&lt;/p&gt;

&lt;h3&gt;
  
  
  Examples of commits using conventional commits
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chore: add commitlint and husky
chore(eslint): enforce the use of double quotes in JSX
refactor: type refactoring
feat: add axios and data handling
feat(page/home): create next routing
chore!: drop support for Node 18
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;With subject, body and footer:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;feat: add function to convert colors in hexadecimal to rgba

Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.

Reviewed-by: 2
Refs: #345
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.conventionalcommits.org"&gt;https://www.conventionalcommits.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/@abhay.pixolo/naming-conventions-for-git-branches-a-cheatsheet-8549feca2534"&gt;https://medium.com/@abhay.pixolo/naming-conventions-for-git-branches-a-cheatsheet-8549feca2534&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://se-education.org/guides/conventions/git.html"&gt;https://se-education.org/guides/conventions/git.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cbea.ms/git-commit/"&gt;https://cbea.ms/git-commit/&lt;/a&gt;
&lt;a href="https://blog.geekhunter.com.br/o-que-e-commit-e-como-usar-commits-semanticos/"&gt;https://blog.geekhunter.com.br/o-que-e-commit-e-como-usar-commits-semanticos/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>[PT-BR] Tudo que você, desenvolvedor, precisa saber sobre Pods no Kubernetes</title>
      <dc:creator>Anthony Vinicius</dc:creator>
      <pubDate>Thu, 01 Feb 2024 15:00:49 +0000</pubDate>
      <link>https://dev.to/anthonyvii/pt-br-tudo-que-voce-desenvolvedor-precisa-saber-sobre-pods-no-kubernetes-29pe</link>
      <guid>https://dev.to/anthonyvii/pt-br-tudo-que-voce-desenvolvedor-precisa-saber-sobre-pods-no-kubernetes-29pe</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Imagem do banner obtida no Pixabay, autor lucasbieri&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Se destacar no mercado de trabalho depende de muitas variáveis e diferentes decisões ao longo da jornada profissional. Atualmente, no momento da escrita deste conteúdo, uma tecnologia vem se destacando forte no mercado e caso você, desenvolvedor, não saiba utilizá-la, com certeza ficará para trás.&lt;/p&gt;

&lt;p&gt;O &lt;strong&gt;Kubernetes&lt;/strong&gt; é uma plataforma &lt;em&gt;open-source&lt;/em&gt; voltada para a orquestração de &lt;em&gt;containers&lt;/em&gt; (e caso você não sabe o que é um &lt;em&gt;container&lt;/em&gt;, e lembrando que &lt;em&gt;container&lt;/em&gt; não é Docker, recomendo você deixar esta aba aberta e ir dar uma estudada rápida sobre &lt;em&gt;containers&lt;/em&gt; antes de iniciar essa leitura) que automatiza o processo implantação, dimensionamento e operação dos aplicativos nos &lt;em&gt;containers&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Este conteúdo faz parte de uma série de artigos onde é abordado todos os principais recursos do &lt;strong&gt;Kubernetes&lt;/strong&gt; aos quais você deverá conhecer. E para começar essa série com o pé direito, seria impossível não começar com ele, a menor unidade do &lt;strong&gt;Kubernetes&lt;/strong&gt;. Venha comigo aprender sobre os &lt;strong&gt;Pods&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;O &lt;strong&gt;Pod&lt;/strong&gt;, como mencionado anteriormente, representa a menor unidade de implantação no ecossistema do &lt;strong&gt;Kubernetes&lt;/strong&gt;. Ele desempenha um papel crucial ao servir como um ambiente isolado que abriga um ou mais &lt;em&gt;containers&lt;/em&gt;. É fundamental entender que o &lt;strong&gt;Kubernetes&lt;/strong&gt; gerencia as aplicações em unidades chamadas &lt;strong&gt;Pods&lt;/strong&gt;, e é dentro desses objetos do &lt;strong&gt;Kubernetes&lt;/strong&gt; que os &lt;em&gt;containers&lt;/em&gt; realmente operam.&lt;/p&gt;

&lt;p&gt;Cada &lt;strong&gt;Pod&lt;/strong&gt; possui seus próprios recursos dedicados, que incluem um endereço IP exclusivo, alocação de memória, capacidade de CPU e outros recursos essenciais. Esses recursos são alocados de forma independente para cada &lt;strong&gt;Pod&lt;/strong&gt;, garantindo assim o isolamento e a autonomia das aplicações em execução.&lt;/p&gt;

&lt;p&gt;Para aqueles que já possuem familiaridade com o conceito de &lt;em&gt;containers&lt;/em&gt;, a transição para o entendimento dos &lt;strong&gt;Pods&lt;/strong&gt; será bastante natural. No entanto, é crucial não confundir um &lt;strong&gt;Pod&lt;/strong&gt; com um &lt;em&gt;container&lt;/em&gt; individual, uma vez que os &lt;strong&gt;Pods podem conter um ou mais containers em seu interior.&lt;/strong&gt; Vale ressaltar que, quando um &lt;strong&gt;Pod&lt;/strong&gt; abriga mais de um container, esses containers operam em estreita colaboração, compartilhando os recursos alocados pelo &lt;strong&gt;Pod&lt;/strong&gt;. Isso significa que eles compartilham o mesmo endereço IP, CPU e memória, tornando essencial a coordenação entre os &lt;em&gt;containers&lt;/em&gt; dentro do mesmo &lt;strong&gt;Pod&lt;/strong&gt; para garantir o funcionamento harmonioso da aplicação como um todo. Essa prática pode até parecer inicialmente um pouco estranha, porém é algo muito comum de ser feita.&lt;/p&gt;

&lt;p&gt;O ciclo de vida de um &lt;strong&gt;Pod&lt;/strong&gt; possui exatos 7 fases que podem ser encontradas abaixo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pending&lt;/strong&gt;: O &lt;strong&gt;Pod&lt;/strong&gt; é criado, porém os &lt;em&gt;containers&lt;/em&gt; internos a ele ainda não foram inicializados ou agendados para execução em um nó;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ContainerCreating&lt;/strong&gt;: Os &lt;em&gt;containers&lt;/em&gt; estão sendo inicializados dentro do &lt;strong&gt;Pod&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Running&lt;/strong&gt;: O &lt;strong&gt;Pod&lt;/strong&gt; está ativo, sem problemas, e processando as solicitações recebidas;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminated&lt;/strong&gt;: Todos os &lt;em&gt;containers&lt;/em&gt; presentes dentro de um &lt;strong&gt;Pod&lt;/strong&gt; foram encerrados ou o &lt;strong&gt;Pod&lt;/strong&gt; sofreu uma falha;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Succeeded&lt;/strong&gt;: Fase posterior à &lt;em&gt;Terminated&lt;/em&gt;, onde todos os &lt;em&gt;containers&lt;/em&gt; dentro de um &lt;strong&gt;Pod&lt;/strong&gt; foram concluídos com êxito;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failed&lt;/strong&gt;: Pelo menos um &lt;em&gt;container&lt;/em&gt; presente no &lt;strong&gt;Pod&lt;/strong&gt; falhou;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unknown&lt;/strong&gt;: O estado de vida do &lt;strong&gt;Pod&lt;/strong&gt; não pôde ser identificado, ou seja, algo na comunicação com o nó sofreu falhas ou há problemas no &lt;em&gt;cluster&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agora que você tem uma noção sobre o que é um &lt;strong&gt;Pod&lt;/strong&gt; e qual a função dele nesse ecossistema &lt;strong&gt;Kubernetes&lt;/strong&gt;, vamos ao que você provavelmente entrou aqui procurando: &lt;strong&gt;"Como eu gerencio um Pod no Kubernetes?".&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Gerenciando um Pod no Kubernetes
&lt;/h2&gt;

&lt;p&gt;A primeira coisa que você deve ter instalado em sua máquina é a interface do &lt;strong&gt;kubectl&lt;/strong&gt;. Com ela, é possível gerenciar tudo relacionado ao seu &lt;strong&gt;Kubernetes&lt;/strong&gt; pelo terminal de forma simples. Caso você não a tenha, deixo abaixo um link para a documentação de como realizar essa instalação. O processo é bem simples e intuitivo!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kubernetes.io/docs/tasks/tools/"&gt;Link para instalação do kubectl&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Com ela instalada, se conecte ao seu ambiente de produção caso seja seu caso, ou caso queira criar um ambiente para estudos, recomendo a utilização do &lt;strong&gt;Minikube&lt;/strong&gt;. Essa ferramenta permite a criação de um ambiente &lt;strong&gt;Kubernetes&lt;/strong&gt; local onde você poderá testar e estudar todos os comandos. Deixo abaixo o link para instalação da mesma na sua máquina.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://minikube.sigs.k8s.io/docs/start/"&gt;Link para instalação do Minikube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Antes de iniciarmos o aprendizado sobre gerenciamento de &lt;em&gt;Pods&lt;/em&gt;, deixa eu te passar alguns comandos essenciais para te ajudar no processo de entendimento do &lt;strong&gt;Kubernetes&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Obter informações sobre o &lt;strong&gt;Cluster Kubernetes&lt;/strong&gt; ao qual você está utilizando:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl cluster-info
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Obter todos os contextos configurados no &lt;em&gt;kubeconfig&lt;/em&gt;:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl config get-contexts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Contextos são os ambientes configurados aos quais a interface do &lt;strong&gt;kubectl&lt;/strong&gt; pode gerenciar. Imagine que você trabalhe para uma empresa que possui um ambiente &lt;strong&gt;Kubernetes&lt;/strong&gt; e queira, em casa, ter além da conexão com o ambiente da empresa, ter também um ambiente local com &lt;strong&gt;Minikube&lt;/strong&gt; para estudar &lt;strong&gt;Kubernetes&lt;/strong&gt;. Os contextos separam esses dois ambientes e você pode utilizá-los de forma única, a partir da seleção de um contexto que pode ser feito utilizando o comando abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl config use-context CONTEXT_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Obter o contexto atual em execução:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl config current-context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agora que você já tem uma base legal sobre &lt;em&gt;Pods&lt;/em&gt; e inicialização do seu ambiente &lt;strong&gt;Kubernetes&lt;/strong&gt;, vamos iniciar o estudo de gerenciamento dos &lt;em&gt;Pods&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Caso você queira visualizar os Pods presentes no seu cluster Kubernetes, utilize:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Esse comando retorna todos os Pods presentes no namespace atual ao qual você está trabalhando. Caso queira especificar um namespace, basta utilizar a flag &lt;strong&gt;-n seguida do nome do namespace&lt;/strong&gt; conforme abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -n NAMESPACE_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Caso queira visualizar todos os &lt;em&gt;Pods&lt;/em&gt; presentes em todos os namespaces, basta utilizar da flag -A ou --all-namespaces conforme apresentado abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -A

kubectl get pods --all-namespaces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Para visualizar um Pod específico, utilizamos:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -n NAMESPACE_NAME POD_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ainda temos uma outra opção bem legal. Você deve ter percebido que, ao utilizar algum dos comandos acima, o resultado é uma tabela com as colunas &lt;em&gt;Namespace, Name, Ready, Status, Restarts e Age&lt;/em&gt;. Porém, ainda é possível visualizar informações super importantes como o IP do Pod e o &lt;em&gt;Node&lt;/em&gt; em que aquele &lt;em&gt;Pod&lt;/em&gt; está sendo executado. Para isso, utilize da flag &lt;strong&gt;-o seguida do valor wide&lt;/strong&gt; conforme apresentado abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -o wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Legal né? Agora vamos adentrar mais ainda no gerenciamento. Existem diversos momentos em que é necessário visualizar informações mais específicas de um &lt;em&gt;Pod&lt;/em&gt; em execução. Para isso, utilize abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl describe pods NOME_POD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Esse comando acima retornará diversas informações do &lt;em&gt;Pod&lt;/em&gt; especificado, como endereço IP, configurações do mesmo e muitas outras. Continuando, uma outra prática interessante é visualizar o manifesto daquele &lt;em&gt;Pod&lt;/em&gt;, ou seja, o arquivo &lt;strong&gt;.yaml (ou JSON)&lt;/strong&gt; que define as configurações e parâmetros do mesmo. Para realizar isso é bem simples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods POD_NAME -o yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Uma prática muito comum na criação dos &lt;em&gt;Pods&lt;/em&gt; é atribuir a eles &lt;em&gt;Labels&lt;/em&gt;. Para buscar os &lt;em&gt;Pods&lt;/em&gt; de uma label específica é muito simples. Basta utilizar da flag &lt;strong&gt;-L seguida do nome da label.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -L LABEL_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agora vamos para outra operação além de visualizar. Para você deletar um &lt;em&gt;Pod&lt;/em&gt; existente, utilize do comando abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl delete pods POD_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;E para criar um &lt;em&gt;Pod&lt;/em&gt;, como eu faço? Para essa operação, existem algumas formas de realizá-la. Vamos passo a passo listando elas.&lt;/p&gt;

&lt;p&gt;A primeira, e mais simples talvez, é utilizar diretamente uma imagem e as configurações default para um &lt;em&gt;Pod&lt;/em&gt;. Para isso, basta executar o comando abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl run POD_NAME --image IMAGE_NAME -n NAMESPACE_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Algumas imagens pedem flags específicas, como por exemplo, um &lt;em&gt;webserver&lt;/em&gt; como o &lt;strong&gt;NGINX&lt;/strong&gt; solicita como flag a porta ao qual o &lt;em&gt;Pod&lt;/em&gt; utilizará. Para criar um &lt;strong&gt;NGINX&lt;/strong&gt; por exemplo, você pode fazer da seguinte forma:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl run POD_NAME --image nginx --port 80 -n NAMESPACE_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;OBS.: Sempre busque a forma de criação para a imagem ao qual você deseja utilizar.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A segunda forma de criação, e a mais utilizada pelo mercado, é através de um manifesto, ou seja, um arquivo &lt;strong&gt;.yaml (ou JSON)&lt;/strong&gt; que define as configurações do &lt;em&gt;Pod&lt;/em&gt; que será criado. Veja um exemplo simples abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Pod&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;pod-nginx&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;containers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cont-nginx&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;containerPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analisando o manifesto acima, temos:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;apiVersion:&lt;/strong&gt; Versão da API do &lt;strong&gt;Kubernetes&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;kind:&lt;/strong&gt; Tipo do objeto &lt;strong&gt;Kubernetes&lt;/strong&gt;, nesse caso, Pod;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;metadata:&lt;/strong&gt; Dados do &lt;em&gt;Pod&lt;/em&gt; que será criado, como o name, labels, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;spec:&lt;/strong&gt; Configurações do &lt;em&gt;Pod&lt;/em&gt; que será criado, como por exemplo, os dados do(s) container(s) em execução dentro do Pod.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ainda existem diversas outras definições que podem ser inseridas dentro deste manifesto. Irei deixar abaixo um link para a documentação do &lt;strong&gt;Kubernetes&lt;/strong&gt; onde você pode encontrá-las. Porém saiba que criar Pods desta forma que estamos informando não é comum, para ser sincero é legal saber como funciona mas você nem vai utilizar dessa maneira no seu dia a dia. A criação dos Pods utilizam de outros objetos do &lt;strong&gt;Kubernetes&lt;/strong&gt; que vão deixar todo o processo mais inteligente, como os &lt;strong&gt;ReplicaSets&lt;/strong&gt; e os &lt;strong&gt;Deployments&lt;/strong&gt; que serão explicados em outros artigos dessa série.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/"&gt;Link para a documentação dos Pods&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Continuando, &lt;em&gt;"eu criei um arquivo .yaml, mas como crio o Pod necessariamente com isso?"&lt;/em&gt;. Simples, basta executar o comando abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f FILE_NAME.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Esse comando aplica as configurações do manifesto definido no &lt;strong&gt;Cluster Kubernetes&lt;/strong&gt;. Para visualizar seu &lt;em&gt;Pod&lt;/em&gt; em execução, você pode usar algum dos comandos que listam os Pods citados acima ou pode usar o comando abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Esse comando vai retornar todos os objetos presentes no ambiente &lt;strong&gt;Kubernetes&lt;/strong&gt;, como os &lt;em&gt;Pods&lt;/em&gt;, &lt;em&gt;Deployments&lt;/em&gt;, etc.&lt;br&gt;
Assim como no &lt;strong&gt;Docker&lt;/strong&gt;, utilizando &lt;strong&gt;Kubernetes&lt;/strong&gt; você também pode criar um container e interagir com ele acessando-o. Para isso, utilize da flag &lt;strong&gt;-ti&lt;/strong&gt; para acessar o modo interativo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl run -ti POD_NAME --image NOME_IMAGE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Um exemplo para você testar é usar a imagem alpine e acessar seu bash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl run -ti POD_NAME --image alpine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Porém, você não vai em diversos momentos criar um Pod e acessar um container dele na mesma hora. Os comandos acima fazem isso (criam e acessam). Você pode, quando quiser, acessar um container que já está em execução. Para isso, basta utilizar do comando abaixo para "atachar" em um container dentro de um Pod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl attach POD_NAME -c CONTAINER_NAME -ti
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Aqui nós temos um ponto super importante para comentar. O comando &lt;strong&gt;attach&lt;/strong&gt; se conecta ao processo principal do &lt;em&gt;container&lt;/em&gt;. Em &lt;em&gt;containers&lt;/em&gt; que utilizam imagens que não são destinadas a servir como um ambiente de linha de comando, a conexão ocorre conforme o esperado. No entanto, em &lt;em&gt;containers&lt;/em&gt; que são executados como &lt;strong&gt;daemons&lt;/strong&gt;, ou seja, em que o processo principal do &lt;em&gt;container&lt;/em&gt; não é um ambiente de linha de comando (como o &lt;em&gt;shell bash&lt;/em&gt;), mas sim um serviço em segundo plano, como é o caso do &lt;strong&gt;NGINX&lt;/strong&gt;, a conexão se comporta de maneira "anômala" porque não há um &lt;em&gt;shell bash&lt;/em&gt; disponível nesse contexto. Nestes casos, recorremos para outro comando, o &lt;strong&gt;exec&lt;/strong&gt;. Com ele é possível realizar a execução de comandos dentro do container. Nos exemplos abaixo, podemos utilizar o &lt;strong&gt;exec&lt;/strong&gt; para acessar o &lt;em&gt;shell bash&lt;/em&gt; de um container &lt;strong&gt;NGINX&lt;/strong&gt; ou visualizar o conteúdo da página HTML respectivamente, em vez de nos conectarmos diretamente ao processo principal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl exec -ti CONTAINER_NAME -- bash

kubectl exec -ti CONTAINER_NAME -- cat /usr/share/nginx/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As coisas estão ficando legais em! Mas calma que ainda temos muito conteúdo pela frente!&lt;/p&gt;

&lt;p&gt;Continuando, vamos falar agora sobre uma flag com um comportamento que inicialmente pode causar estranheza, mas que depois você entenderá um de seus usos. A flag &lt;strong&gt;dry-run=client&lt;/strong&gt; simula a execução de algo, ou seja, ela mostra o resultado da execução porém não faz a execução do comando em si. Estranho né? Mas vamos pensar no seguinte contexto. Imagina que você quer criar um manifesto de um &lt;em&gt;Pod&lt;/em&gt; a partir de uma imagem e não sabe por onde começar. Seria muito legal ter um escopo base, porém como ter esse escopo sem ter que criar um &lt;em&gt;Pod&lt;/em&gt; e visualizar seu manifesto? Simples, utilizando a flag &lt;strong&gt;dry-run=client&lt;/strong&gt; você vai simular a criação do container e assim, visualizar seu manifesto sem tê-lo criado.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl run POD_NAME --image IMAGE_NAME --dry-run=client -o yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Caso queira salvar o manifesto em algum arquivo, basta executar o comando no formato abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl run POD_NAME --image IMAGE_NAME --dry-run=client -o yaml &amp;gt; manifesto.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perceba que o comando acima gera um arquivo &lt;strong&gt;.yaml&lt;/strong&gt; no final. Caso o manifesto que você queira salvar seja em &lt;strong&gt;JSON&lt;/strong&gt;, altere o comando para criar um arquivo &lt;strong&gt;JSON&lt;/strong&gt; no final.&lt;/p&gt;

&lt;p&gt;Bom, chegamos ao fim do nosso estudo sobre &lt;em&gt;Pods&lt;/em&gt;. Será abordado em breve os outros objetos do &lt;strong&gt;Kubernetes&lt;/strong&gt; que você deve conhecer e estudar sobre. Esse formato de artigo é pensado para passar de forma mais rápida e direta o que todo desenvolvedor precisa conhecer. Caso queira se especializar nos &lt;em&gt;Pods&lt;/em&gt; do &lt;strong&gt;Kubernetes&lt;/strong&gt;, recomendo uma leitura mais minuciosa em toda a parte teórica presente na documentação do mesmo ao qual deixo o link abaixo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/"&gt;Documentação sobre os Pods do Kubernetes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Espero que tenha gostado e até a próxima!&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>development</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
