• terraform state list: List resources from the terraform state

    1 min read

    terraform state list resources state list

    To be able to get a list of resources managed by terraform we can use terraform state list for listing all the resources on the terraform state:

    07/05/2021

    Read more...
  • formatting Terraform code

    2 min read

    terraform format fmt

    One of the nicest functions terraform has is terraform fmt: Just as go fmt would do with Go code, it will rewrite Terraform configuration files (.tf and .tfvars files) to a canonical format and style. This will improve it's readability, helping making the code more consistent.

    06/05/2021

    Read more...
  • Kubernetes: Image pull policies

    2 min read

    imagePullPolicy pod kubernetes

    On Kubernetes we can configure using the Pod manifest under which conditions we want to query the container registry to pull images by using the imagePullPolicy setting. We can configure the it on several objects like Deployment, StatefulSet, Pod, Job... In fact, we can set it on any object that includes a Pod template

    apiVersion: v1
    kind: Pod
    metadata:
      name: test-pod
      namespace: demo
    spec:
      containers:
      - image: alpine
        imagePullPolicy: IfNotPresent
    (...)
    

    05/05/2021

    Read more...
  • terraform: Import existing resources for terraform to manage them

    3 min read

    terraform import state

    If we have some of the infrastructure that were created manually we can still import it into the terraform state. This ensures you can have a smooth transition from manually created resources to Infrastructure as Code

    To do so we will be using then terraform import command:

    $ terraform import
    The import command expects two arguments.
    Usage: terraform import [options] ADDR ID
    
    (...)
    

    04/05/2021

    Read more...
  • unable to retrieve the complete list of server APIs

    2 min read

    While performing any action we might encounter the following error:

    error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request
    

    03/05/2021

    Read more...

More recent...

Older content...