Thursday, August 26, 2021
Own Dockerfile
Monday, August 23, 2021
Process of access AWS EKS
Here are the steps to access AWS EKS from command line.
1. Create a config file in ~/.aws directory named config with the following contentThursday, August 19, 2021
Example to overwrite istio configuration parameters
The following is an example of config.yaml file which can be used to install istio with customized parameters:
Tuesday, August 10, 2021
Setup k8s cluster with kind using different k8s releases
#!/bin/bash #! /bin/bash # This script sets up k8s cluster using metallb and istio # Make sure you have the following executable in your path # kubectl # kind # istioctl # Setup some colors ColorOff='\033[0m' # Text Reset Black='\033[0;30m' # Black Red='\033[0;31m' # Red Green='\033[0;32m' # Green K8S_RELEASE=$1 # Get all the available releases alltags=$(wget -q https://registry.hub.docker.com/v1/repositories/kindest/node/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}') rm -rf ~/.kube/* if [ -z $K8S_RELEASE ]; then kind create cluster else if [[ "$alltags" == *"$K8S_RELEASE"* ]]; then kind create cluster --image=kindest/node:$K8S_RELEASE else echo "Available k8s releases are $alltags" exit 1 fi fi # The following procedure is to setup load balancer kubectl cluster-info --context kind-kind kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/master/manifests/namespace.yaml kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)" kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/master/manifests/metallb.yaml PREFIX=$(docker network inspect -f '{{range .IPAM.Config }}{{ .Gateway }}{{end}}' kind | cut -d '.' -f1,2) cat <
Tuesday, August 3, 2021
k8s service full domain name
orderer-sample.default.svc.cluster.local
<service-name>.<namespace>.svc.cluster.local
Sunday, August 1, 2021
Run playbook to access k8s with service account mounted.
That image will work if service account with some required collections installed
Use this command to run this playbook
- name: Start fabric operations
hosts: localhost
gather_facts: no
connection: local
tasks:
- name: Search for the matching secret of the CA organization
community.kubernetes.k8s_info:
kind: Secret
register: casecret
- debug:
var: casecret
ansible-playbook test.yaml -e "ansible_python_interpreter=/usr/bin/python3.8"
Friday, July 16, 2021
echo parse and display a certificate
You often gets a certificate in base64 encoded format, but you want to see what is in the certificate, here is the one liner to do this in linux
echo "<<this is the encoded certificate>>" | base64 -d | openssl x509 -noout -text
That is all it takes to see what is inside of the certificate.