Kubernetes

cat << 'EOF' | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/managed-by: pulumi
  name: aws-auth
  namespace: kube-system
data:
  mapRoles: |
    - rolearn: 'arn:aws:iam::455014111722:role/eks01-ba9f4ab'
      username: 'system:node:{{EC2PrivateDNSName}}'
      groups:
        - 'system:bootstrappers'
        - 'system:nodes'
    - rolearn: 'arn:aws:iam::455014111722:role/eks01-infra-c0e7402'
      username: 'system:node:{{EC2PrivateDNSName}}'
      groups:
        - 'system:bootstrappers'
        - 'system:nodes'
  mapUsers: | 
    - userarn: 'arn:aws:iam::351161127462:user/greg.bacchus'
      username: 'gregbacchus'
      groups:
        - 'system:masters'
EOF

Useful Commands

# list istio injection config for namespaces
kubectl get ns -L istio-injection

# list only namespaces that have istio injection enabled
kubectl get ns -l istio-injection=enabled

# nginx basic auth
 printf "${username}:`openssl passwd -apr1`\n" | base64

Last updated

Was this helpful?