azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

"az k8s-configuration flux create" ssl verify false option

Open fkucuk opened this issue 4 years ago • 5 comments

I have an AKS cluster and I am using Azure Devops Server 2019 (OnPrem).

I am using a GoDaddy certificate on Azure Devops Server.

I am running the following command:

az k8s-configuration flux create \
   --name cluster-config \
   --cluster-name arc-cicd-cluster \
   --namespace cluster-config \
   --resource-group myResourceGroup \
   -u https://dev.azure.com/<Your organization>/<Your project>/arc-cicd-demo-gitops \
   --https-user <Azure Repos username> \
   --https-key <Azure Repos PAT token> \
   --scope cluster \
   --cluster-type managedClusters \
   --branch master \
   --kustomization name=cluster-config prune=true path=arc-cicd-cluster/manifests

The result:

{
  "bucket": null,
  "complianceState": "Non-Compliant",
  "configurationProtectedSettings": {
    "httpsKey": "<redacted>"
  },
  "errorMessage": "",
  "gitRepository": {
    "httpsCaCert": null,
    "httpsUser": "***********",
    "localAuthRef": null,
    "repositoryRef": {
      "branch": "master",
      "commit": null,
      "semver": null,
      "tag": null
    },
    "sshKnownHosts": null,
    "syncIntervalInSeconds": 600,
    "timeoutInSeconds": 600,
    "url": "https://******************/arc-cicd-demo-gitops"
  },
  "id": "/subscriptions/***************/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/cluster-config",
  "kustomizations": {
    "cluster-config": {
      "dependsOn": null,
      "force": false,
      "name": "cluster-config",
      "path": "arc-cicd-cluster/manifests",
      "prune": true,
      "retryIntervalInSeconds": null,
      "syncIntervalInSeconds": 600,
      "timeoutInSeconds": 600
    }
  },
  "name": "cluster-config",
  "namespace": "cluster-config",
  "provisioningState": "Succeeded",
  "repositoryPublicKey": "",
  "resourceGroup": "*******",
  "scope": "cluster",
  "sourceKind": "GitRepository",
  "sourceSyncedCommitId": "",
  "sourceUpdatedAt": null,
  "statusUpdatedAt": "2022-04-25T12:10:19.732000+00:00",
  "statuses": [
    {
      "appliedBy": null,
      "complianceState": "Non-Compliant",
      "helmReleaseProperties": null,
      "kind": "GitRepository",
      "name": "cluster-config",
      "namespace": "cluster-config",
      "statusConditions": [
        {
          "lastTransitionTime": "2022-04-25T12:10:05+00:00",
          "message": "unable to clone: user rejected certificate for ***************",
          "reason": "GitOperationFailed",
          "status": "False",
          "type": "Ready"
        }
      ]
    },
    {
      "appliedBy": null,
      "complianceState": "Non-Compliant",
      "helmReleaseProperties": null,
      "kind": "Kustomization",
      "name": "cluster-config-cluster-config",
      "namespace": "cluster-config",
      "statusConditions": [
        {
          "lastTransitionTime": "2022-04-25T11:51:00+00:00",
          "message": "Source is not ready, artifact not found",
          "reason": "ArtifactFailed",
          "status": "False",
          "type": "Ready"
        }
      ]
    }
  ],
  "suspend": false,
  "systemData": {
    "createdAt": "2022-04-25T11:50:30.938613+00:00",
    "createdBy": null,
    "createdByType": null,
    "lastModifiedAt": "2022-04-25T12:09:34.020172+00:00",
    "lastModifiedBy": null,
    "lastModifiedByType": null
  },
  "type": "Microsoft.KubernetesConfiguration/fluxConfigurations"
}

I think Flux on AKS can not verify the SSL certificate. Is there an option to skip ssl verification?

By the way, when I check my private azure devops URL: " Verify return code: 21 (unable to verify the first certificate)"

I think there is a problem with my certificate, even if Chrome and Firefox says the certificate is OK.

But is there a way to skip the SSL Verification with this "az k8s-configuration flux create" command?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

fkucuk avatar Apr 25 '22 12:04 fkucuk

route to CXP team

yonzhan avatar Apr 25 '22 12:04 yonzhan

Hello @fkucuk Thanks for reaching out on this issue!

We are routing this issue to the Service Team's attention!

SatishBoddu-MSFT avatar Apr 26 '22 23:04 SatishBoddu-MSFT

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm.

Issue Details

I have an AKS cluster and I am using Azure Devops Server 2019 (OnPrem).

I am using a GoDaddy certificate on Azure Devops Server.

I am running the following command:

az k8s-configuration flux create \
   --name cluster-config \
   --cluster-name arc-cicd-cluster \
   --namespace cluster-config \
   --resource-group myResourceGroup \
   -u https://dev.azure.com/<Your organization>/<Your project>/arc-cicd-demo-gitops \
   --https-user <Azure Repos username> \
   --https-key <Azure Repos PAT token> \
   --scope cluster \
   --cluster-type managedClusters \
   --branch master \
   --kustomization name=cluster-config prune=true path=arc-cicd-cluster/manifests

The result:

{
  "bucket": null,
  "complianceState": "Non-Compliant",
  "configurationProtectedSettings": {
    "httpsKey": "<redacted>"
  },
  "errorMessage": "",
  "gitRepository": {
    "httpsCaCert": null,
    "httpsUser": "***********",
    "localAuthRef": null,
    "repositoryRef": {
      "branch": "master",
      "commit": null,
      "semver": null,
      "tag": null
    },
    "sshKnownHosts": null,
    "syncIntervalInSeconds": 600,
    "timeoutInSeconds": 600,
    "url": "https://******************/arc-cicd-demo-gitops"
  },
  "id": "/subscriptions/***************/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/cluster-config",
  "kustomizations": {
    "cluster-config": {
      "dependsOn": null,
      "force": false,
      "name": "cluster-config",
      "path": "arc-cicd-cluster/manifests",
      "prune": true,
      "retryIntervalInSeconds": null,
      "syncIntervalInSeconds": 600,
      "timeoutInSeconds": 600
    }
  },
  "name": "cluster-config",
  "namespace": "cluster-config",
  "provisioningState": "Succeeded",
  "repositoryPublicKey": "",
  "resourceGroup": "*******",
  "scope": "cluster",
  "sourceKind": "GitRepository",
  "sourceSyncedCommitId": "",
  "sourceUpdatedAt": null,
  "statusUpdatedAt": "2022-04-25T12:10:19.732000+00:00",
  "statuses": [
    {
      "appliedBy": null,
      "complianceState": "Non-Compliant",
      "helmReleaseProperties": null,
      "kind": "GitRepository",
      "name": "cluster-config",
      "namespace": "cluster-config",
      "statusConditions": [
        {
          "lastTransitionTime": "2022-04-25T12:10:05+00:00",
          "message": "unable to clone: user rejected certificate for ***************",
          "reason": "GitOperationFailed",
          "status": "False",
          "type": "Ready"
        }
      ]
    },
    {
      "appliedBy": null,
      "complianceState": "Non-Compliant",
      "helmReleaseProperties": null,
      "kind": "Kustomization",
      "name": "cluster-config-cluster-config",
      "namespace": "cluster-config",
      "statusConditions": [
        {
          "lastTransitionTime": "2022-04-25T11:51:00+00:00",
          "message": "Source is not ready, artifact not found",
          "reason": "ArtifactFailed",
          "status": "False",
          "type": "Ready"
        }
      ]
    }
  ],
  "suspend": false,
  "systemData": {
    "createdAt": "2022-04-25T11:50:30.938613+00:00",
    "createdBy": null,
    "createdByType": null,
    "lastModifiedAt": "2022-04-25T12:09:34.020172+00:00",
    "lastModifiedBy": null,
    "lastModifiedByType": null
  },
  "type": "Microsoft.KubernetesConfiguration/fluxConfigurations"
}

I think Flux on AKS can not verify the SSL certificate. Is there an option to skip ssl verification?

By the way, when I check my private azure devops URL: " Verify return code: 21 (unable to verify the first certificate)"

I think there is a problem with my certificate, even if Chrome and Firefox says the certificate is OK.

But is there a way to skip the SSL Verification with this "az k8s-configuration flux create" command?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Author: fkucuk
Assignees: -
Labels:

Service Attention, AKS, customer-reported, Kubernetes Configuration, Auto-Assign

Milestone: -

ghost avatar Apr 26 '22 23:04 ghost

@bavneetsingh16 , can you pl. take a look at this?

NarayanThiru avatar Jan 08 '24 18:01 NarayanThiru

The k8s-configuration cli does not support the parameter to skip ssl verification.

bavneetsingh16 avatar Jul 02 '24 19:07 bavneetsingh16