Setup remote https registry
docker container rm -v registry
ls /var/lib/
cd
mkdir certs
cd certs
openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key -addext "subjectAltName = DNS:myregistry.jankester.com" -x509 -days 365 -out certs/domain.crt
cd ..
openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key -addext "subjectAltName = DNS:myregistry.jankester.com" -x509 -days 365 -out certs/domain.crt
ls -ltr
ls
cd certificate_authority
history | grep import
ls -ltr ../
ls -ltr ../certs
cd
docker run -d --restart=always --name registry -v "$(pwd)"/certs:/certs -e REGISTRY_HTTP_ADDR=0.0.0.0:5443 -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key -p 5443:5443 registry:2
docker container ls
history | grep allow
sudo ufw allow 5443
docker images ls
curl -X GET http://localhost:5000/v2/_catalogs
curl -X GET https://localhost:443/v2/_catalogs
curl -X GET https://localhost:5443/v2/_catalogs
curl -X GET -k https://localhost:5443/v2/_catalogs
ping myregistry.jankester.com
Push image
docker pull hello-world
docker tag hello-world:latest myregistry.jankester.com:5443/my-hello-world
docker push myregistry.jankester.com:5443/my-hello-world
curl -X GET -k https://localhost:5443/v2/_catalog
ls
cd source
ls
cd microservices-in-dotnet-book-second-edition/
ls
cd Chapter03/
ls -lt
vi shopping-cart-local.yaml
history | grep apply
kubectl apply -f shopping-cart-local.yaml
kubectl get all
kubectl delete all
kubectl get all
kubectl delete pod/shopping-cart-7dbc5f55b-vv2wv pod/shopping-cart-d6c9bd467-wr5xz service/kubernetes service/shopping-cart deployment.apps/shopping-cart replicaset.apps/shopping-cart-7dbc5f55b replicaset.apps/shopping-cart-d6c9bd467
kubectl get all
kubectl apply -f shopping-cart-local.yaml
kubectl get all
ls
cat shopping-cart-local.yaml
ls -ltr
vi shopping-cart.yaml
vi shopping-cart-local.yaml
kubectl get all
sudo apt-get base64
sudo apt-get install base64
wget localhost:8080
wget localhost:8080/shopping-cart/123
wget localhost:8080/shoppingcart/123
man wget
wget -O - localhost:8080/shoppingcart/123
wget -O localhost:8080/shoppingcart/123
wget -o localhost:8080/shoppingcart/123
curl localhost:8080/shoppingcart/123
curl -X POST http://localhost:8080/shoppingcart/123/items -H "Content-Type: application/json" -d '[1,2]'
curl localhost:8080/shoppingcart/123
kubectl -n kube-system describe secret default
kubectl get all
cd source/microservices-in-dotnet-book-second-edition/Chapter03/
vi shopping-cart-local.yaml
ls -ltr
kubectl apply -f shopping-cart-local.yaml
ping www.jankester.com
vi shopping-cart-local.yaml
kubectl apply -f shopping-cart-local.yaml
kubectl get all
wget localhost:5001
wget 192.55.14.78:5001
wget 192.55.14.78:5001/shoppingcart/123
netstat -an | grep -w LISTEN
wget http://192.55.14.78:5001/shoppingcart/123
vi shopping-cart-local.yaml
kubectl apply -f shopping-cart-local.yaml
vi shopping-cart-local.yaml
cat shopping-cart-local.yaml
kubectl port-forward shopping-cart 80:8080
kubectl get all
kubectl port-forward pod/shopping-cart-d6c9bd467-2qxmf 80:8080
kubectl port-forward pod/shopping-cart-d6c9bd467-2qxmf 8080:80
ls -ltr
cd certificate_authority
ls
ls pki/
ls pki/private/
cd
cd cert
cd certs/
ls
cat domain.crt
sudo cp domain.crt /usr/local/share/ca-certificates/domain.crt
sudo update-ca-certficates
sudo update-ca-certificates
microk8s stop
microk8s start
kubectl get all
kubectl delete pod/shopping-cart-d6c9bd467-lnqp7
history | grep mic
cd source/microservices-in-dotnet-book-second-edition/Chapter03/
ls
kubectl apply -f shopping-cart-local.yaml
kubectl get all
Test kubectl
wget http://localhost:5001/v2/search?
curl -X GET -k https://localhost:5443/v2/_catalog
history | grep curl
curl -X POST http://localhost:5000/shoppingcart/123/items -H "Content-Type: application/json" -d '[5,15,29]'
curl -X POST http://localhost:5001/shoppingcart/123/items -H "Content-Type: application/json" -d '[5,15,29]'
kubectl get all
cat shopping-cart-local.yaml
view shopping-cart-local.yaml
netstat -an | grep -w LISTEN
kubectl get all
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
kubectl proxy
microk8s stop
Comments