Moving from DO to AKS with Gitlab CI/CD

Artyou Global 111 Reputation points
2022-10-12T13:29:32.453+00:00

Hello! What I´m doing: I´m moving my cluster from Digital Ocean to AKS.
What I use: I use Gitlab CI/CD, ingress-nginx and cert-manager.

Take a look in the CI/CD from gitlab:

get credentials:staging:  
  stage: credentials  
  image: digitalocean/doctl  
  variables:  
    GIT_STRATEGY: staging  
  script:  
    - env | sort  
    - /app/doctl kubernetes cluster kubeconfig show $CLUSTERNAME_STAGING --access-token $DO_TOKEN_STAGING > kubeconfig  
  artifacts:  
    paths:  
      - kubeconfig  
    expire_in: 1 week  
  dependencies: []  
  environment:  
    name: staging  
  only:  
    - staging  

My problem:
1- I can´t find a correspondent to the AKS image that I need to run in the project.

image: digitalocean/doctl

2- I can´t find the correspondent to apply this kubeconfig.

    - /app/doctl kubernetes cluster kubeconfig show $CLUSTERNAME_STAGING --access-token $DO_TOKEN_STAGING > kubeconfig  

I tried

  • az connectedk8s connect -g $AZURE_RESOURCEGROUP_STAGING -n $AZURE_CLUSTERNAME_STAGING --kube-config > kubeconfig

but it seems the ">" operator not answer in Azure CLI

Also, I´m facing some trouble... I can´t understand If I need to install each command from Az CLI or if it´s all built in.

Thank you!

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,456 questions
0 comments No comments
{count} votes

Accepted answer
  1. srbhatta-MSFT 8,586 Reputation points Microsoft Employee
    2022-10-13T05:25:57.513+00:00

    Hello @Artyou Global ,
    Welcome to QnA Platform.
    You can use any of the above image, either pull it from Docker hub or you can also pull it from Microsoft Container Registry (mcr) as per your wish.
    Hope that helps. :)
    Thanks.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Artyou Global 111 Reputation points
    2022-10-12T16:59:13.273+00:00

    I found after 4 hours the repo where the official images are.
    Should I use cli image or node image, thinking my apps runs in Node
    https://hub.docker.com/_/microsoft-azure-cli
    mcr.microsoft.com/azure-functions/node:4-node16

    0 comments No comments

  2. Artyou Global 111 Reputation points
    2022-10-27T12:47:29.747+00:00

    Thank you @srhatta-msft!
    It solved, our cluster is running beautiful in AKS. Best!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.