{"id":18524462,"url":"https://github.com/stelligent/skaffold_on_aws","last_synced_at":"2026-01-23T07:06:26.678Z","repository":{"id":145835774,"uuid":"147122834","full_name":"stelligent/skaffold_on_aws","owner":"stelligent","description":"example of running skaffold on an aws eks cluster","archived":false,"fork":false,"pushed_at":"2020-01-07T20:12:27.000Z","size":175,"stargazers_count":21,"open_issues_count":1,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-17T05:41:59.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stelligent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-02T21:22:00.000Z","updated_at":"2023-11-17T06:15:59.000Z","dependencies_parsed_at":"2023-05-05T19:33:51.341Z","dependency_job_id":null,"html_url":"https://github.com/stelligent/skaffold_on_aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stelligent/skaffold_on_aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fskaffold_on_aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fskaffold_on_aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fskaffold_on_aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fskaffold_on_aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stelligent","download_url":"https://codeload.github.com/stelligent/skaffold_on_aws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fskaffold_on_aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28682293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T17:41:55.821Z","updated_at":"2026-01-23T07:06:26.664Z","avatar_url":"https://github.com/stelligent.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# skaffold_on_aws\nstelligent (probably) won't pay for my gcp account, so let's get [Skaffold](https://github.com/GoogleContainerTools/skaffold) running on AWS!\n\n# assumptions\n* [you've got the aws cli install and configured](https://docs.aws.amazon.com/cli/latest/userguide/installing.html)\n* [you've got docker installed and configured](https://docs.docker.com/install/)\n\nIf you'd rather do this on an EC2 instance instead of your laptop, I got you fam:\n\n    aws cloudformation create-stack \\\n      --stack-name workstation-$(date +%Y%m%d%H%M%S) \\\n      --template-body file://provisioning/workstation.yml \\\n      --capabilities CAPABILITY_IAM \\\n      --parameters \\\n        ParameterKey=\"KeyName\",ParameterValue=\"your-key-pair\"\n\nTho, if you do that, it might be hard to make changes to your code and see them autodeploy.\n\n# things to do\nIf you wish to create an apple pie from scratch, you must first create the universe. So let's create an EKS cluster, and everything you need for that, starting with the VPC. *KeyName* should be an ec2 keypair you have in the account; *NodeImageId* should be either `ami-08cab282f9979fc7a` for us-west-2, or `ami-0b2ae3c6bda8b5c06` for us-east-1.\n\n    export stack_name=skaffold-on-aws-$(date +%Y%m%d%H%M%S)\n    aws cloudformation create-stack \\\n      --stack-name $stack_name \\\n      --template-body file://provisioning/eks.yml \\\n      --capabilities CAPABILITY_IAM \\\n      --parameters \\\n        ParameterKey=\"KeyName\",ParameterValue=\"jonny-labs\" \\\n        ParameterKey=\"NodeImageId\",ParameterValue=\"ami-0b2ae3c6bda8b5c06\"\n\nThat stack is gonna take about 15m to come up. In the meantime, we'll need to install a few things for everything to work\n\n## aws-iam-authenticator\n\nThis is used to get `kubectl` to authenticate to your EKS cluster.\n\n    curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/linux/amd64/aws-iam-authenticator\n    chmod +x ./aws-iam-authenticator\n    mkdir -p $HOME/bin # ...just in case\n    cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator \u0026\u0026 export PATH=$HOME/bin:$PATH\n\nConfirm it is installed correctly with this command:\n\n    aws-iam-authenticator help\n\n## kubectl\n\nThis is used to interact with your EKS cluster.\n\n    sudo apt-get update \u0026\u0026 sudo apt-get install -y apt-transport-https\n    curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -\n    sudo touch /etc/apt/sources.list.d/kubernetes.list \n    echo \"deb http://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list\n    sudo apt-get update\n    sudo apt-get install -y kubectl\n\nConfirm it's installed correctly with this command:\n\n    kubectl version --short --client\n\nNow we'll need to create a `kubeconfig` file. \n\n    cluster_name=$(aws cloudformation describe-stack-resources --stack-name $stack_name --query StackResources[?ResourceType==\\'AWS::EKS::Cluster\\'].PhysicalResourceId --output text)\n    endpoint_url=$(aws eks describe-cluster --name $cluster_name  --query cluster.endpoint --output text)\n    ca_cert=$(aws eks describe-cluster --name $cluster_name  --query cluster.certificateAuthority.data --output text)\n    mkdir -p ~/.kube\n    cat \u003c\u003c KBCFG \u003e ~/.kube/config-${cluster_name}\n    apiVersion: v1\n    clusters:\n    - cluster:\n        server: $endpoint_url\n        certificate-authority-data: $ca_cert\n      name: kubernetes\n    contexts:\n    - context:\n        cluster: kubernetes\n        user: aws\n      name: aws\n    current-context: aws\n    kind: Config\n    preferences: {}\n    users:\n    - name: aws\n      user:\n        exec:\n          apiVersion: client.authentication.k8s.io/v1alpha1\n          command: aws-iam-authenticator\n          args:\n            - \"token\"\n            - \"-i\"\n            - \"$cluster_name\"\n    KBCFG\n    export KUBECONFIG=$KUBECONFIG:~/.kube/config-${cluster_name}\n\nYou can confirm everything is working with this command (assuming the cloudformation stack above has completed!:\n\n    kubectl get svc\n\nIf that doesn't give you back some cluster info, running it in verbose mode should help you figure out why:\n\n    kubectl get svc --v=10\n\nWith `kubectl` installed, we need to use it to add our nodes to the EKS Cluster.\n\n    node_group_role_arn=$(aws cloudformation describe-stacks --stack-name $stack_name --query Stacks[*].Outputs[?OutputKey==\\'NodeGroupRoleArn\\'].OutputValue --output text)\n    cat \u003c\u003c AUTHCFG \u003e aws-auth-cm.yaml\n    apiVersion: v1\n    kind: ConfigMap\n    metadata:\n      name: aws-auth\n      namespace: kube-system\n    data:\n      mapRoles: |\n        - rolearn: $node_group_role_arn\n          username: system:node:{{EC2PrivateDNSName}}\n          groups:\n            - system:bootstrappers\n            - system:nodes\n    AUTHCFG\n    kubectl apply -f aws-auth-cm.yaml\n\nIt will take a few moments for the nodes to be added. You can check their progress with this command:\n\n     kubectl get nodes\n\n You're looking for the `STATUS` field to be `Ready` for all nodes.\n\n## skaffold\n\nAnd we'll actually need to install Skaffold\n\n    curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64\n    chmod +x skaffold\n    sudo mv skaffold $HOME/bin\n\nAnd now configure it to work with EKS/ECR:\n\n    # login to ECR\n    $(aws ecr get-login --no-include-email)\n\n    # lookup all relevant information\n    export ecr=$(aws cloudformation describe-stack-resources --stack-name $stack_name --query StackResources[?ResourceType==\\'AWS::ECR::Repository\\'].PhysicalResourceId --output text)\n    export repository_uri=$(aws ecr describe-repositories --repository-names $ecr --query repositories[*].repositoryUri --output text)\n    export region=us-east-1\n    export secret=${region}-ecr-registry\n    export password=$(aws ecr get-authorization-token --output text --query authorizationData[].authorizationToken | base64 -d | cut -d: -f2)\n    email=user@host.com\n\n    # configure kubes to log into ECR\n    kubectl delete secret --ignore-not-found $secret\n    kubectl create secret docker-registry $secret \\\n     --docker-server=https://${repository_uri} \\\n     --docker-username=AWS \\\n     --docker-password=\"${password}\" \\\n     --docker-email=\"${email}\"\n\n    # set up skaffold and k8s configuration files\n    cat \u003c\u003c SKFLDCFG \u003e skaffold.yaml\n    apiVersion: skaffold/v1alpha2\n    kind: Config\n    build:\n      artifacts:\n      - imageName: ${repository_uri}\n    deploy:\n      kubectl:\n        manifests:\n          - k8s-*\n    SKFLDCFG\n\n    cat \u003c\u003c PODCFG \u003e k8s-pod.yaml\n    apiVersion: v1\n    kind: Pod\n    metadata:\n      name: getting-started\n    spec:\n      hostNetwork: true\n      containers:\n      - name: getting-started\n        image: ${repository_uri}\n        ports:\n        - containerPort: 80\n      imagePullSecrets:\n      - name: us-east-1-ecr-registry  \n    PODCFG\n\nAlright, at this point you should be able to run skaffold and have it deploy\n\n    skaffold dev\n\nAnd then in another window if you run\n\n    kubectl describe pods\n\nYou should see all the information about your running container! If you make any changes in that directory, Skaffold will detect it, rebuild the container, and push it to your Kubernetes cluster.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelligent%2Fskaffold_on_aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstelligent%2Fskaffold_on_aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelligent%2Fskaffold_on_aws/lists"}