{"id":2599,"date":"2021-01-05T12:42:57","date_gmt":"2021-01-05T11:42:57","guid":{"rendered":"https:\/\/geko2.factoryfy.com\/kubectl-plugins-in-just-3-steps\/"},"modified":"2021-11-04T09:37:37","modified_gmt":"2021-11-04T08:37:37","slug":"kubectl-plugins-in-just-3-steps","status":"publish","type":"post","link":"https:\/\/geko.cloud\/en\/kubectl-plugins-in-just-3-steps\/","title":{"rendered":"Kubectl Plugins in just 3 steps"},"content":{"rendered":"<div style=\"display: none;\"><\/div>\n<h2>Introduction<\/h2>\n<p>Many times to fullfill our daily tasks we find ourselves in the situation of having to build our own tools to solve specific problems or situations. In this note I am going to show you how easy it is to create a <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/extend-kubectl\/kubectl-plugins\/\">plugin for kubectl<\/a>.<\/p>\n<p>A <strong>plugin<\/strong> is simply an executable program that allows you to extend the functionality of kubectl, allowing us to implement our own subcommands.<br \/>\nIt is important to mention that we can code it in the language we like the most: Bash, Python, Go, etc&#8230;<\/p>\n<h3>What do we need?<\/h3>\n<p>There are certain conditions that we must meet for our <strong>plugin<\/strong> to work:<\/p>\n<ol>\n<li>The file name must begin with: <strong>kubectl-<\/strong> and must not contain an extension.<\/li>\n<li>It must be an executable file.<\/li>\n<li>It should be located in our <strong>$PATH<\/strong> and this will be all the installation it would require. Pretty simple, no?<\/li>\n<\/ol>\n<p>We can list available <strong>plugins<\/strong> on our system using:<\/p>\n<p>&nbsp;<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">kubectl plugin list\r\n<\/pre>\n<\/div>\n<p>This command will search on our <strong>PATH<\/strong> for all executable files that meet the required conditions.<\/p>\n<h2>Let&#8217;s do it!<\/h2>\n<h3>Create a test environment<\/h3>\n<p>Let&#8217;s make a simple <strong>plugin<\/strong>, more entertaining than the trivial \u00abHello World!\u00bb, that sends the logs of all running pods to a single output to be able to view this output jointly.<\/p>\n<p>To make it more entertaining we will add the name of the pod in colors for each log line in the output. And we can also select with the numeric keys from 1 to N (where N is the nth pod: 1 on-the-fly and see only the output of that pod.<\/p>\n<p>And we will do all this in Bash!<\/p>\n<p>For this demo we are going to use a docker image <a href=\"https:\/\/hub.docker.com\/r\/kscarlett\/nginx-log-generator\">nginx-log-generator<\/a> that generates <strong>Nginx<\/strong> fake-logs. We will first create a <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/controllers\/deployment\/\">kubernetes deployment<\/a> that will contain the pods. We create a new file called <strong>fake-logs.yaml<\/strong> with the following content:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">apiVersion: apps\/v1\r\nkind: Deployment\r\nmetadata:\r\n  name: my-fake-logger\r\nspec:\r\n  template:\r\n    metadata:\r\n      name: logger-1\r\n      labels:\r\n        app: logger\r\n    spec:\r\n      containers:\r\n        - name: logger\r\n          image: kscarlett\/nginx-log-generator\r\n  replicas: 3\r\n  selector:\r\n    matchLabels:\r\n      app: logger<\/pre>\n<\/div>\n<p>Apply the deployment:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">kubectl create -f fake-logs.yaml\r\n<\/pre>\n<\/div>\n<p>Let&#8217;s check that our <em>deploy<\/em> is working:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">$ kubectl get pods\r\nNAME                              READY   STATUS    RESTARTS   AGE\r\nmy-fake-logger-66dcffbccd-6kx8b   1\/1     Running   4          6d2h\r\nmy-fake-logger-66dcffbccd-7q4tm   1\/1     Running   1          3d1h\r\nmy-fake-logger-66dcffbccd-cff4s   1\/1     Running   1          3d1h\r\n\r\n$ kubectl get deploy\r\nNAME             READY   UP-TO-DATE   AVAILABLE   AGE\r\nmy-fake-logger   3\/3     3            3           6d2h<\/pre>\n<\/div>\n<h3>Create the plugin:<\/h3>\n<p><strong>First:<\/strong> We will create our plugin file named <strong>kubectl-demo<\/strong> with the following script.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">#!\/bin\/bash\r\ntrap ctrl_c INT\r\nfunction ctrl_c() {\r\n  echo \"**************************************** Bye Bye ****************************************\"\r\n  for pid in ${PIDS[@]}\r\n  do\r\n      kill -TERM $pid \r\n  done\r\n  rm $NAMED_PIPE\r\n  rm $sync\r\n  exit 0\r\n}\r\n\r\nfunction colorize() {\r\n\r\n  pod=$1\r\n  counter=$2\r\n  # colors from 31 to 39\r\n  pre_colour=\"\\033[3${counter}m\"\r\n  post_colour=\"\\033[0m\"\r\n  if [ \"$colorize_output\" = true ]\r\n  then\r\n    colour_pod=\"${pre_colour}[${pod}]${post_colour}\"\r\n  else\r\n    colour_pod=\"[${pod}]\"\r\n  fi\r\n}\r\n\r\nfunction show_logs() {\r\n  local sync=\"$1\"\r\n  grep -E -f $sync $NAMED_PIPE &amp;\r\n}\r\n\r\nfunction banner() {\r\n  echo \"\"\r\n  echo \"===================================================\"\r\n  echo \"+ Showing logs for:\"\r\n  echo \"+ $1\"\r\n  echo \"===================================================\"\r\n  echo \"\"\r\n}\r\n\r\nfunction start_log() {\r\n  show_logs $sync \r\n  shl_pid=$!\r\n  disown $shl_pid\r\n  PIDS+=$shl_pid\" \"  \r\n}\r\n\r\nfunction usage() {\r\n  echo \"~~~~~~~~~~~\"\r\n  echo \" U S A G E\"\r\n  echo \"~~~~~~~~~~~\"\r\n  echo \"Usage: kubectl demo [option]\"\r\n  echo \"  options:\"\r\n  echo \"    --no-colorize: no colorize [default: colorize]\"\r\n  echo \"    -h: Show this help\"\r\n  echo \"\"\r\n  echo \"When running you can use the numbers 1 to N to filter N-pod and only show it's output.\"\r\n  echo \"0 resets and shows all outputs again\"\r\n  echo \"\"\r\n}\r\n\r\nNAMED_PIPE=\"\/tmp\/my_named_pipe\"\r\nPODS=$(kubectl get pods --no-headers=true -o=custom-columns=NAME:.metadata.name)\r\nTOTAL_PODS=$(echo $PODS | sed -s 's\/ \/n\/g' | wc -l)\r\ncolorize_output=true\r\n\r\nif [[ $@ ]]; then\r\n  case \"$@\" in\r\n    \"--no-colorize\")\r\n      colorize_output=false\r\n      ;;\r\n    \"-h\")\r\n      usage\r\n      exit 1\r\n      ;;\r\n    *) echo \"Invalid option\"\r\n      exit 1\r\n      ;;\r\n  esac\r\nfi\r\n\r\n\r\n# create named pipe\r\nif [ ! -p $NAMED_PIPE ]\r\nthen\r\n    mkfifo $NAMED_PIPE\r\n    chmod a+rw $NAMED_PIPE\r\nfi\r\n\r\nPIDS=()\r\ndeclare -A pods_index\r\ncounter=1\r\nfor pod in $(echo $PODS)\r\ndo\r\n  colour_pod=\"\"\r\n  colorize $pod $counter\r\n  kubectl logs -f $pod | awk -v pod_name=$colour_pod '{print pod_name\" \"$0}' &gt; $NAMED_PIPE &amp;\r\n  PIDS+=$!\" \" # save all PIDs\r\n  pods_index[$counter]=$pod\r\n  counter=$((counter+1))\r\ndone\r\n\r\n# Trick: Shared memory segment for inter process comunication. \r\nsync=\/dev\/shm\/syntest-$$  # allocate a shared memory segment name for this pid\r\necho '' &gt; $sync           # init the shm\r\n\r\nstart_log\r\ninput=\"*\"\r\nre='^[0-9]+$' # we match only numbers\r\n\r\nwhile true\r\ndo\r\n  read -t 0.25 -N 1 input\r\n  if  [[ $input =~ $re ]]  &amp;&amp; [ \"$input\" -ge \"0\" ] &amp;&amp; [ \"$input\" -le \"$TOTAL_PODS\" ]\r\n  then\r\n    if [ \"$input\" -eq \"0\" ]\r\n    then\r\n      banner \"All Pods\"\r\n      echo $ &gt; $sync    # grep everything\r\n    else\r\n      banner ${pods_index[$input]}\r\n      echo ${pods_index[$input]} &gt; $sync  # grep only pod name\r\n    fi\r\n    kill -SIGTERM $shl_pid\r\n    PIDS=$(echo $PID | sed -e \"s\/$shl_pid\/\/g\" | tr -s \" \")  # remove unused pid\r\n    start_log\r\n  fi\r\ndone<\/pre>\n<\/div>\n<p><strong>Second: <\/strong>Set execution permissions<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">chmod +x kubectl-demo\r\n<\/pre>\n<\/div>\n<p><strong>Third:\u00a0<\/strong>And last step, we need our script to be accessible from our <strong>PATH<\/strong>.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">ln -s $PWD\/kubectl-demo \/usr\/local\/bin\/kubectl-demo\r\n<\/pre>\n<\/div>\n<p>From now on, and with nothing else to do, we can make use of our newly created <strong>plugin<\/strong>.<\/p>\n<p>We can check that <strong>kubectl<\/strong> is ready to use it by listing the plugins it finds:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">$ kubectl plugin list\r\nThe following compatible plugins are available:\r\n\r\n\/home\/user\/kubectl-demo<\/pre>\n<\/div>\n<h2>Let&#8217;s test it!<\/h2>\n<p>We show the possible options:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">$ kubectl demo -h\r\n~~~~~~~~~~~\r\n U S A G E\r\n~~~~~~~~~~~\r\nUsage: kubectl demo [option]\r\n  options:\r\n    --no-colorize: no colorize [default: colorize]\r\n    -h: Show this help\r\n\r\nWhen running you can use the numbers 1 to N to filter N-pod and only show it's output.\r\n0 resets and shows all outputs again<\/pre>\n<\/div>\n<p>As an example of how we can pass parameters to our sub-commands, we have added the option to allow not to paint the output.<\/p>\n<h2>Outputs<\/h2>\n<p>Default:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">[my-fake-logger-66dcffbccd-7q4tm] 214.216.236.37--[02\/Jan\/2021:10:17:17+0000] \r\n\"GET\/moderator\/Reduced.cssHTTP\/1.1\"....\r\n[my-fake-logger-66dcffbccd-6kx8b] 132.56.98.34--[02\/Jan\/2021:10:19:22+0000] \r\n\"GET\/standardization.svgHTTP\/1.1\"2001908 \r\n[my-fake-logger-66dcffbccd-cff4s] 159.240.103.70--[02\/Jan\/2021:10:24:45+0000] \r\n\"GET\/Virtual.htmHTTP\/1.1\"2002288\"-\"....<\/pre>\n<\/div>\n<p>We can choose which <strong>POD <\/strong>want to display with the numbers 1 to 3 in this case:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\"># 1\r\n===================================================\r\n+ Showing logs for:\r\n+ my-fake-logger-66dcffbccd-6kx8b\r\n===================================================\r\n[my-fake-logger-66dcffbccd-6kx8b]  16.211.208.91 - - [02\/Jan\/2021:10:34:33 +0000]  \"GET \/bottom-line%20Advanced\/Upgradable\/intermediate.svg HTTP\/1.1\" ....<\/pre>\n<\/div>\n<p>And we can reset too default view by using number 0 and have all the logs again:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">===================================================\r\n+ Showing logs for:\r\n+ All Pods\r\n===================================================\r\n[my-fake-logger-66dcffbccd-7q4tm] 214.216.236.37--[02\/Jan\/2021:10:17:17+0000] \"GET\/moderator\/Reduced.cssHTTP\/1.1\"30143\"-\"....\r\n[my-fake-logger-66dcffbccd-6kx8b]  16.211.208.91 - - ....<\/pre>\n<\/div>\n<p>As we can see, the script is pretty simple and I invite you to try all its options, modify it to your liking and extend its functionality.<\/p>\n<h2>Conclusion<\/h2>\n<p>We saw that it is extremely easy to create a kubectl plugin, it is enough to program what our imagination wants and comply with the executable name and location.<\/p>\n<p>Because of this facility, there is no excuse for not making a plugin for practically every specific need. It is also necessary to comment that there is a large number of <a href=\"https:\/\/github.com\/ishantanu\/awesome-kubectl-plugins\">plugins provided by<\/a> the community. It&#8217;s worth taking a look!<\/p>\n<p>I hope this note has helped you to learn something new and continue to expand your knowledge.<\/p>\n<p>I invite you if you need information about the <a href=\"https:\/\/geko.cloud\/es\/devops\/\"><strong>DevOps<\/strong><\/a> world or <a href=\"https:\/\/geko.cloud\/es\/que-es-kubernetes\/\">Kubernetes<\/a>, <a href=\"https:\/\/geko.cloud\/es\/contacto\/\">contact us<\/a> and keep checking <a href=\"https:\/\/geko.cloud\/es\/blog\/labs\/\">our blog<\/a> to find other useful publications.<\/p>\n<p><a href=\"https:\/\/geko.cloud\/es\/blog\/labs\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3265\" src=\"https:\/\/geko2.factoryfy.com\/wp-content\/uploads\/geko-1-150x150.png\" alt=\"\" width=\"82\" height=\"82\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Many times to fullfill our daily tasks we find ourselves in the situation of having to build our own tools to solve specific problems or situations. In this note I am going to show you how easy it is to create a plugin for kubectl. A plugin is simply an executable program that allows [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":2118,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[67],"tags":[90],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kubectl Plugins in just 3 steps - Geko Cloud<\/title>\n<meta name=\"description\" content=\"A plugin is simply an executable program that allows you to extend the functionality of kubectl. Find out what it is and how to create a kubectl plugin.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/geko.cloud\/es\/kubectl-plugins\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kubectl Plugins in just 3 steps - Geko Cloud\" \/>\n<meta property=\"og:description\" content=\"A plugin is simply an executable program that allows you to extend the functionality of kubectl. Find out what it is and how to create a kubectl plugin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/geko.cloud\/es\/kubectl-plugins\/\" \/>\n<meta property=\"og:site_name\" content=\"Geko Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-05T11:42:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-04T08:37:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2667\" \/>\n\t<meta property=\"og:image:height\" content=\"1775\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Christian\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@geko_cloud\" \/>\n<meta name=\"twitter:site\" content=\"@geko_cloud\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/\"},\"author\":{\"name\":\"Christian\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/7284169754650e302ab1278789d95d0e\"},\"headline\":\"Kubectl Plugins in just 3 steps\",\"datePublished\":\"2021-01-05T11:42:57+00:00\",\"dateModified\":\"2021-11-04T08:37:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/\"},\"wordCount\":596,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/geko.cloud\/es\/#organization\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png\",\"keywords\":[\"Kubernetes\"],\"articleSection\":[\"Labs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/geko.cloud\/es\/kubectl-plugins\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/\",\"url\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/\",\"name\":\"Kubectl Plugins in just 3 steps - Geko Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/geko.cloud\/es\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png\",\"datePublished\":\"2021-01-05T11:42:57+00:00\",\"dateModified\":\"2021-11-04T08:37:37+00:00\",\"description\":\"A plugin is simply an executable program that allows you to extend the functionality of kubectl. Find out what it is and how to create a kubectl plugin.\",\"breadcrumb\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/geko.cloud\/es\/kubectl-plugins\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/#primaryimage\",\"url\":\"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png\",\"contentUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png\",\"width\":2667,\"height\":1775,\"caption\":\"Plugin\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/geko.cloud\/es\/kubectl-plugins\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/geko.cloud\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kubectl Plugins in just 3 steps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/geko.cloud\/es\/#website\",\"url\":\"https:\/\/geko.cloud\/es\/\",\"name\":\"Geko Cloud\",\"description\":\"Servicios de consultor\u00eda cloud y devops\",\"publisher\":{\"@id\":\"https:\/\/geko.cloud\/es\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/geko.cloud\/es\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/geko.cloud\/es\/#organization\",\"name\":\"Geko Cloud\",\"url\":\"https:\/\/geko.cloud\/es\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png\",\"contentUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png\",\"width\":1650,\"height\":809,\"caption\":\"Geko Cloud\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/geko_cloud\",\"https:\/\/www.instagram.com\/gekocloud\/\",\"https:\/\/www.linkedin.com\/company\/gekocloud\",\"https:\/\/www.youtube.com\/channel\/UC5EFLCqUM7fEaXSa_0nWowQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/7284169754650e302ab1278789d95d0e\",\"name\":\"Christian\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/85abc7d877c6141512e82b54a333c262?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/85abc7d877c6141512e82b54a333c262?s=96&d=mm&r=g\",\"caption\":\"Christian\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kubectl Plugins in just 3 steps - Geko Cloud","description":"A plugin is simply an executable program that allows you to extend the functionality of kubectl. Find out what it is and how to create a kubectl plugin.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/geko.cloud\/es\/kubectl-plugins\/","og_locale":"en_US","og_type":"article","og_title":"Kubectl Plugins in just 3 steps - Geko Cloud","og_description":"A plugin is simply an executable program that allows you to extend the functionality of kubectl. Find out what it is and how to create a kubectl plugin.","og_url":"https:\/\/geko.cloud\/es\/kubectl-plugins\/","og_site_name":"Geko Cloud","article_published_time":"2021-01-05T11:42:57+00:00","article_modified_time":"2021-11-04T08:37:37+00:00","og_image":[{"width":2667,"height":1775,"url":"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png","type":"image\/png"}],"author":"Christian","twitter_card":"summary_large_image","twitter_creator":"@geko_cloud","twitter_site":"@geko_cloud","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/#article","isPartOf":{"@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/"},"author":{"name":"Christian","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/7284169754650e302ab1278789d95d0e"},"headline":"Kubectl Plugins in just 3 steps","datePublished":"2021-01-05T11:42:57+00:00","dateModified":"2021-11-04T08:37:37+00:00","mainEntityOfPage":{"@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/"},"wordCount":596,"commentCount":0,"publisher":{"@id":"https:\/\/geko.cloud\/es\/#organization"},"image":{"@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/#primaryimage"},"thumbnailUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png","keywords":["Kubernetes"],"articleSection":["Labs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/geko.cloud\/es\/kubectl-plugins\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/","url":"https:\/\/geko.cloud\/es\/kubectl-plugins\/","name":"Kubectl Plugins in just 3 steps - Geko Cloud","isPartOf":{"@id":"https:\/\/geko.cloud\/es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/#primaryimage"},"image":{"@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/#primaryimage"},"thumbnailUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png","datePublished":"2021-01-05T11:42:57+00:00","dateModified":"2021-11-04T08:37:37+00:00","description":"A plugin is simply an executable program that allows you to extend the functionality of kubectl. Find out what it is and how to create a kubectl plugin.","breadcrumb":{"@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/geko.cloud\/es\/kubectl-plugins\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/#primaryimage","url":"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png","contentUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/plug_mesa-de-trabajo-1.png","width":2667,"height":1775,"caption":"Plugin"},{"@type":"BreadcrumbList","@id":"https:\/\/geko.cloud\/es\/kubectl-plugins\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/geko.cloud\/en\/"},{"@type":"ListItem","position":2,"name":"Kubectl Plugins in just 3 steps"}]},{"@type":"WebSite","@id":"https:\/\/geko.cloud\/es\/#website","url":"https:\/\/geko.cloud\/es\/","name":"Geko Cloud","description":"Servicios de consultor\u00eda cloud y devops","publisher":{"@id":"https:\/\/geko.cloud\/es\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/geko.cloud\/es\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/geko.cloud\/es\/#organization","name":"Geko Cloud","url":"https:\/\/geko.cloud\/es\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/","url":"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png","contentUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png","width":1650,"height":809,"caption":"Geko Cloud"},"image":{"@id":"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/geko_cloud","https:\/\/www.instagram.com\/gekocloud\/","https:\/\/www.linkedin.com\/company\/gekocloud","https:\/\/www.youtube.com\/channel\/UC5EFLCqUM7fEaXSa_0nWowQ"]},{"@type":"Person","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/7284169754650e302ab1278789d95d0e","name":"Christian","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/85abc7d877c6141512e82b54a333c262?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/85abc7d877c6141512e82b54a333c262?s=96&d=mm&r=g","caption":"Christian"}}]}},"_links":{"self":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/2599"}],"collection":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/comments?post=2599"}],"version-history":[{"count":3,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/2599\/revisions"}],"predecessor-version":[{"id":5269,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/2599\/revisions\/5269"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/media\/2118"}],"wp:attachment":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/media?parent=2599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/categories?post=2599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/tags?post=2599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}