Starting the Amazon AppConfig agent for Amazon EKS integration - Amazon AppConfig
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Starting the Amazon AppConfig agent for Amazon EKS integration

The Amazon AppConfig Agent sidecar container is automatically available in your Amazon EKS environment. To use it, you must start it. The following procedure describes how to use the Amazon EKS kubectl command line tool to start the agent.

Note

Before you continue, ensure that your kubeconfig file is up to date. For more information about creating or editing a kubeconfig file, see Creating or updating a kubeconfig file for an Amazon EKS cluster in the Amazon EKS User Guide.

To start Amazon AppConfig Agent (kubectl command line tool)
  1. Open the manifest for your application and verify that your Amazon EKS application is running as a single-container deployment. Contents of the file should look similar to the following.

    apiVersion: apps/v1 kind: Deployment metadata: name: my-app namespace: my-namespace labels: app: my-application-label spec: replicas: 1 selector: matchLabels: app: my-application-label template: metadata: labels: app: my-application-label spec: containers: - name: my-app image: my-repo/my-image imagePullPolicy: IfNotPresent
  2. Add the Amazon AppConfig Agent container definition details to your deployment manifest.

    - name: appconfig-agent image: public.ecr.aws/aws-appconfig/aws-appconfig-agent:2.x ports: - name: http containerPort: 2772 protocol: TCP env: - name: SERVICE_REGION value: Amazon Web Services Region imagePullPolicy: IfNotPresent
    Note

    Note the following information.

  3. Run the following kubectl command to apply the changes to your cluster. Replace my-deployment with the name of your deployment manifest.

    kubectl apply -f my-deployment.yml
  4. After the deployment finishes, verify that Amazon AppConfig Agent is running. Use the following command to view the application pod log file.

    kubectl logs -n my-namespace -c appconfig-agent my-pod

    Locate a statement like the following for the Amazon AppConfig Agent container: [appconfig agent] 1970/01/01 00:00:00 INFO serving on localhost:2772

Note

You can adjust the default behavior of Amazon AppConfig Agent by entering or changing environment variables. For information about the available environment variables, see (Optional) Using environment variables to configure Amazon AppConfig Agent for Amazon ECS and Amazon EKS.