install Floci and use aws on localhost

 curl -fsSL https://floci.io/install.sh | sh
Installing Floci CLI...
Downloading floci 0.4.0 for darwin-amd64...
Checksum verified.

Floci CLI 0.4.0 installed to /usr/local/bin/floci

Quick start:
  floci start            # launch Floci
  floci doctor           # check your environment
  export AWS_ENDPOINT_URL=http://localhost:4566
  aws s3 mb s3://my-bucket  # use the AWS CLI against Floci

floci start
Checking image floci/floci:latest (policy: missing)...
latest: Pulling from floci/floci
25582d7c77aa: Pulling fs layer
df21d34bd12f: Pulling fs layer
324dcf10649f: Pulling fs layer
39da49f3279b: Pulling fs layer
9ed273b013df: Pulling fs layer
616bd0c8998c: Pulling fs layer
39da49f3279b: Waiting
9ed273b013df: Waiting
616bd0c8998c: Waiting
324dcf10649f: Verifying Checksum
df21d34bd12f: Verifying Checksum
324dcf10649f: Download complete
df21d34bd12f: Download complete
25582d7c77aa: Verifying Checksum
25582d7c77aa: Download complete
9ed273b013df: Download complete
39da49f3279b: Verifying Checksum
39da49f3279b: Download complete
25582d7c77aa: Pull complete
df21d34bd12f: Pull complete
324dcf10649f: Pull complete
39da49f3279b: Pull complete
9ed273b013df: Pull complete
616bd0c8998c: Verifying Checksum
616bd0c8998c: Download complete
616bd0c8998c: Pull complete
Digest: sha256:5ee85db604c4aa74ac76e07ea5cc83086f37bb472bf3dbb97e34019e48efae9c
Status: Downloaded newer image for floci/floci:latest
docker.io/floci/floci:latest
Starting Floci AWS container...
Container started (a70355eaa5d3)
Waiting for Floci AWS to be ready...
Floci AWS is ready (http://localhost:4566)

http://localhost:4566/

http://localhost:4500/console/aws

mkdir test-local-cluster
cd test-local-cluster

export AWS_ENDPOINT_URL=http://localhost:4566
export AWS_DEFAULT_REGION=us-east-1
export AWS_ACCESS_KEY_ID=test
export AWS_SECRET_ACCESS_KEY=test
aws eks create-cluster \
--name dev-cluster \
--role-arn arn:aws:iam::000000000000:role/eks-role \
--resources-vpc-config subnetIds=subnet-default-us-east-1-a
aws eks wait cluster-active --name dev-cluster
aws iam create-user --user-name eks-admin
read AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY <<< "$(aws iam create-access-key \
--user-name eks-admin --query 'AccessKey.[AccessKeyId,SecretAccessKey]' --output text)"
export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
aws eks update-kubeconfig --name dev-cluster
kubectl run nginx --image=nginx:alpine --port=80
kubectl get pods,svc

kubectl get ns
NAME STATUS AGE
default Active 2m9s
kube-node-lease Active 2m9s
kube-public Active 2m9s
kube-system Active 2m9s
kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.100.0.1 <none> 443/TCP 113s
kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx 1/1 Running 0 65s
http://localhost:4500/console/aws

Leave a Reply