https://github.com/sinanislekdemir/aws-k8s-minikube
This is a sample repository for k8s demo and not the best practices. It "just works"
https://github.com/sinanislekdemir/aws-k8s-minikube
Last synced: 3 months ago
JSON representation
This is a sample repository for k8s demo and not the best practices. It "just works"
- Host: GitHub
- URL: https://github.com/sinanislekdemir/aws-k8s-minikube
- Owner: sinanislekdemir
- Created: 2020-12-23T10:22:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-23T10:34:23.000Z (over 4 years ago)
- Last Synced: 2025-01-21T00:20:14.204Z (4 months ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Handy Commands
## Start minikube with virtualbox
```
minikube start --driver=virtualbox
```
or to make it default
```
minikube config set driver virtualbox
```## Set docker environment of minikube for local
```
eval $(minikube docker-env)
cd app
docker build .
docker tag myapp:latest
```# AWS ECS Script
Remember that minikube can't fetch images from private aws ecs registry without secrets set.
For any other namespace other than `default`, please define `--namespace ` to the belowe kubectl commands.
```
ACCOUNT=<12 digits aws account code>
REGION=eu-central-1
SECRET_NAME=${REGION}-ecr-registry
EMAIL=TOKEN=`aws ecr --region=$REGION get-authorization-token --output text \
--query authorizationData[].authorizationToken | base64 -d | cut -d: -f2`kubectl delete secret --ignore-not-found $SECRET_NAME
kubectl create secret docker-registry $SECRET_NAME \
--docker-server=https://${ACCOUNT}.dkr.ecr.${REGION}.amazonaws.com \
--docker-username=AWS \
--docker-password="${TOKEN}" \
--docker-email="${EMAIL}"```
## Some Notes
### Reachint to ingress
```
kubectl get ingress
```Add the IP Address with host to `/etc/hosts`