-
Notifications
You must be signed in to change notification settings - Fork 10
/
generate_keytab_secret
13 lines (9 loc) · 1.2 KB
/
generate_keytab_secret
1
2
3
4
5
6
7
8
9
10
11
12
kubectl -n default-tenant cp kuberos-kuberos-kdc-0:/etc/krb5.keytab krb5.keytab -c kadmin
kubectl -n default-tenant cp kuberos-kuberos-kdc-0:/etc/hdfs.keytab hdfs.keytab -c kadmin
keytool -genkey -alias hadoop-master.hadoop-domain.default-tenant.svc.cluster.local -keyalg rsa -keysize 1024 -dname "CN=hadoop-master.hadoop-domain.default-tenant.svc.cluster.local" -keypass changeme -keystore ./hdfs.jks -storepass changeme
keytool -genkey -alias hadoop-worker.hadoop-domain.default-tenant.svc.cluster.local -keyalg rsa -keysize 1024 -dname "CN=hadoop-worker.hadoop-domain.default-tenant.svc.cluster.local" -keypass changeme -keystore ./hdfs.jks -storepass changeme
keytool -genkey -alias hadoop-master -keyalg rsa -keysize 1024 -dname "CN=hadoop-master" -keypass changeme -keystore ./hdfs.jks -storepass changeme
keytool -genkey -alias hadoop-worker -keyalg rsa -keysize 1024 -dname "CN=hadoop-worker" -keypass changeme -keystore ./hdfs.jks -storepass changeme
kubectl -n default-tenant delete secret krb5-keytab
kubectl -n default-tenant create secret generic krb5-keytab --from-file=krb5.keytab=krb5.keytab --from-file=hdfs.keytab=hdfs.keytab --from-file=hdfs.jks=hdfs.jks
rm -rf ./krb5.keytab ./hdfs.keytab ./hdfs.jks