You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build definition name/build number: (unsure how to locate)
Agent - Private:
If using private agent, provide the OS of the machine running the agent and the agent version:
OS: RHEL 7.7
Agent Version: 2.175.2
Container: alpine:3
Issue Description
The following task in an ado pipeline is used in order to log into a kubernetes cluster:
- task: Kubernetes@1displayName: 'login to k8s'inputs:
connectionType: Kubernetes Service ConnectionkubernetesServiceEndpoint: 'kubernetesServiceEndpoint.com'command: login
If there is a timeout or another failure for any reason, this task does not fail. This leads to any future tasks in the pipeline which executes code on the k8s cluster to fail.
Here is an example of a failure:
Starting: login to k8s==============================================================================Task : KubectlDescription : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commandsVersion : 1.181.0Author : Microsoft CorporationHelp : https://aka.ms/azpipes-kubectl-tsg==============================================================================Prepending PATH environment variable with directory: /usr/bin==============================================================================Kubectl Client Version: v1.20.1Kubectl Server Version: Could not find kubectl server version==============================================================================commandOutputFinishing: login to k8s
Retries of the same pipeline without any changes will often work.
Here is an example of a success on Attempt #2, without any changes to code or pipeline.
Starting: login to k8s==============================================================================Task : KubectlDescription : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commandsVersion : 1.181.0Author : Microsoft CorporationHelp : https://aka.ms/azpipes-kubectl-tsg==============================================================================Prepending PATH environment variable with directory: /usr/bin==============================================================================Kubectl Client Version: v1.20.1Kubectl Server Version: v1.18.12+vmware.2==============================================================================commandOutputFinishing: login to k8s
One can notice that now the Kubectl Server Version is valid on Attempt #2
Given that kubectl version command is not explicitly requested by your pipeline config, I suppose it's okay not fail upon failure. This is more or less to help with debugging.
Based on this PR, this change was introduced way after KubectlV1 task was released, I suppose the decision to not fail had something to do with back-compatibility.
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: Kubernetes
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment
Server - Azure Pipelines
Agent - Private:
Issue Description
The following task in an ado pipeline is used in order to log into a kubernetes cluster:
If there is a timeout or another failure for any reason, this task does not fail. This leads to any future tasks in the pipeline which executes code on the k8s cluster to fail.
Here is an example of a failure:
Retries of the same pipeline without any changes will often work.
Here is an example of a success on Attempt #2, without any changes to code or pipeline.
One can notice that now the
Kubectl Server Version
is valid on Attempt #2Task logs
Attached as a zip file
f715a6ba-3879-5f79-a1ba-81e2d10a389e.zip
The text was updated successfully, but these errors were encountered: