{"id":15291703,"url":"https://github.com/azure/kubectl-aks","last_synced_at":"2025-04-13T09:33:09.638Z","repository":{"id":43820076,"uuid":"429887601","full_name":"Azure/kubectl-aks","owner":"Azure","description":"Azure Kubernetes Service (AKS) kubectl plugin","archived":false,"fork":false,"pushed_at":"2024-09-03T22:22:04.000Z","size":667,"stargazers_count":32,"open_issues_count":20,"forks_count":8,"subscribers_count":68,"default_branch":"main","last_synced_at":"2025-04-09T10:12:02.887Z","etag":null,"topics":["aks","azure","azure-cli","kubectl","kubectl-plugins","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-19T17:50:53.000Z","updated_at":"2025-03-13T05:44:24.000Z","dependencies_parsed_at":"2023-12-21T20:04:35.598Z","dependency_job_id":"3ce74984-99e4-47e3-85e1-65de206a99aa","html_url":"https://github.com/Azure/kubectl-aks","commit_stats":null,"previous_names":["azure/kubectl-az"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fkubectl-aks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fkubectl-aks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fkubectl-aks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fkubectl-aks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/kubectl-aks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248690979,"owners_count":21146245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aks","azure","azure-cli","kubectl","kubectl-plugins","kubernetes"],"created_at":"2024-09-30T16:13:59.999Z","updated_at":"2025-04-13T09:33:09.616Z","avatar_url":"https://github.com/Azure.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Kubernetes Service (AKS) kubectl plugin\n\n`kubectl-aks` is a `kubectl` plugin that provides a set of commands that enable\nusers to interact with an AKS cluster even when the control plane is not\nfunctioning as expected. For example, users can still use the plugin to debug\ntheir cluster if the API server is not working correctly. This plugin allows\nusers to perform various tasks, retrieve information, and execute commands\nagainst the cluster nodes, regardless of the control plane's state.\n\nIt's important to note that this plugin does not replace the Azure CLI,\n[az](https://learn.microsoft.com/en-us/cli/azure/?view=azure-cli-latest).\nInstead, it complements it by offering additional commands and providing users\nwith a kubectl-like experience. In practice, users will use `az` to create and\ndelete their AKS cluster, and then use `kubectl` and `kubectl-aks` to interact\nwith and debug it.\n\nGoing through the following documentation will help you to understand each\navailable command and which one is the most suitable for your case:\n\n- [run-command](docs/run-command.md)\n- [check-apiserver-connectivity](docs/check-apiserver-connectivity.md)\n- [config](docs/config.md)\n\nTake into account that `kubectl-aks` expects the cluster to use virtual machine\nscale sets, which is the case of an AKS cluster.\n\nYou can get the node information needed to execute the commands directly from\nthe [Azure portal](https://portal.azure.com/) or you can let `kubectl-aks` get\nthat information for you. If you already have such a information, you can pass\nit using the flags or environment variables. If you don't have it, `kubectl-aks`\ncan retrieve it either from the Azure API or the Kubernetes API server. If you\nexpect to use the same node multiple times, it is recommended to import the node\ninformation in the configuration file and set it as the default node, see the\n[config](docs/config.md) command for further details.\n\n## Install\n\nThere is multiple ways to install the `kubectl-aks`.\n\n### Using krew\n\n[krew](https://sigs.k8s.io/krew) is the recommended way to install `kubectl-aks`.\nYou can follow the [krew's\nquickstart](https://krew.sigs.k8s.io/docs/user-guide/quickstart/) to install it\nand then install `kubectl-aks` by executing the following command:\n\n```bash\nkubectl krew install aks\nkubectl aks version\n```\n\nIt can be uninstalled using the following command:\n\n```bash\nkubectl krew uninstall aks\n```\n\n### Install a specific release\n\nIt is possible to download the asset for a given release and platform from the\n[releases page](https://github.com/azure/kubectl-aks/releases/), uncompress and\nmove the `kubectl-aks` executable to any folder in your `$PATH`.\n\n```bash\nVERSION=$(curl -s https://api.github.com/repos/azure/kubectl-aks/releases/latest | jq -r .tag_name)\ncurl -sL https://github.com/azure/kubectl-aks/releases/latest/download/kubectl-aks-linux-amd64-${VERSION}.tar.gz | sudo tar -C ${HOME}/.local/bin -xzf - kubectl-aks\nkubectl aks version\n```\n\nIt can be uninstalled by using the following command:\n\n```bash\nrm ${HOME}/.local/bin/kubectl-aks\n```\n\n### Compile from source\n\nTo build `kubectl-aks` from source, you'll need to have a Golang version 1.17\nor higher installed:\n\n```bash\ngit clone https://github.com/Azure/kubectl-aks.git\ncd kubectl-aks\n# Build and copy the resulting binary in $HOME/.local/bin/\nmake install\nkubectl aks version\n```\n\nIt can be uninstalled by using the following command:\n\n```bash\nmake uninstall\n```\n\n## Usage\n\n```\n$ kubectl aks --help\nAzure Kubernetes Service (AKS) kubectl plugin\n\nUsage:\n  kubectl-aks [command]\n\nAvailable Commands:\n  check-apiserver-connectivity Check connectivity between the nodes and the Kubernetes API Server\n  completion                   Generate the autocompletion script for the specified shell\n  config                       Manage configuration\n  help                         Help about any command\n  run-command                  Run a command in a node\n  version                      Show version\n\nFlags:\n  -h, --help   help for kubectl-aks\n\nUse \"kubectl-aks [command] --help\" for more information about a command.\n```\n\nIt is necessary to sign in to Azure to run any `kubectl-aks` command. To do so,\nyou can use any authentication method provided by the [Azure\nCLI](https://github.com/Azure/azure-cli/) using the `az login` command; see\nfurther details\n[here](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli).\nHowever, if you do not have the Azure CLI or have not signed in yet,\n`kubectl-aks` will open the default browser and load the Azure sign-in page where\nyou need to authenticate.\n\n### Permissions\n\nIn order to run `kubectl-aks` commands, the user/service principal must have the permissions to perform the\nfollowing [operations](https://learn.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations):\n\n- Run command on the instances: `Microsoft.Compute/virtualMachineScaleSets/virtualmachines/runCommand/action`\n- List Virtual Machine Scale Sets (VMSS): `Microsoft.Compute/virtualMachineScaleSets/virtualMachines/read`\n- List Virtual Machine Scale Set Instances (VMSS Instances): `Microsoft.Compute/virtualMachineScaleSets/read`\n\nNormally if you are using [built-in](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles)\nroles e.g Contributor, you should have the above permissions. However, if you are\nusing [custom roles](https://learn.microsoft.com/en-us/azure/role-based-access-control/custom-roles-portal) for a\nservice principal, you need to make sure that the permissions are granted.\n\n## Thanks\n\n- [az](https://github.com/Azure/azure-cli): `kubectl-aks` is inspired by the\n  Azure CLI.\n- [azure-sdk-for-net](https://github.com/Azure/azure-sdk-for-net): it is used to\n  interact with the Azure API.\n- [krew](https://sigs.k8s.io/krew): it is used to distribute `kubectl-aks` as a\n  kubectl plugin.\n- [InnovationEngine](https://github.com/Azure/InnovationEngine/): it is used to\n  ensure that the documentation is always up to date.\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution. For\ndetails, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., status check,\ncomment). Simply follow the instructions provided by the bot. You will only need\nto do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of\nConduct](https://opensource.microsoft.com/codeofconduct/). For more information\nsee the [Code of Conduct\nFAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact\n[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional\nquestions or comments.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or\nservices. Authorized use of Microsoft trademarks or logos is subject to and must\nfollow [Microsoft's Trademark \u0026 Brand\nGuidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must\nnot cause confusion or imply Microsoft sponsorship. Any use of third-party\ntrademarks or logos are subject to those third-party's policies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fkubectl-aks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Fkubectl-aks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fkubectl-aks/lists"}