|
| 1 | +# User Provider mTLS |
| 2 | + |
| 3 | +In this scenario example, you'll deploy the Confluent platform each with its own certificate to validate the architecture and deployment. The certificates that are generated in this example use the `sandbox` namespace. **NOTE** You will need to change this for your environment which is why the generate_certificates.sh script is used. |
| 4 | + |
| 5 | +1. Create one server certificate per Confluent component service. You'll use the same certificate authority for all. Update `zookeeper-server-domain.json` and `kafka-server-domain.json` with your namespace and generate certificates for each component. |
| 6 | + |
| 7 | +```shell |
| 8 | + cd examples/userprovided-mtls |
| 9 | + ./generate_certificates.sh |
| 10 | +``` |
| 11 | + |
| 12 | +2. Deploy the CRDS using the standard way: |
| 13 | +```shell |
| 14 | +kubectl apply -k ../../kustomize/crds |
| 15 | +``` |
| 16 | + |
| 17 | +3. Deploy the mTLS example which use Kustomize to pull in the base and example overlays using the following |
| 18 | +```shell |
| 19 | +kubectl apply -k . |
| 20 | +``` |
| 21 | + |
| 22 | +4. Validate zookeeper is working using: |
| 23 | +```shell |
| 24 | +kubectl logs -f -n sandbox zookeeper-0 |
| 25 | + |
| 26 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib |
| 27 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:java.io.tmpdir=/tmp |
| 28 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:java.compiler=<NA> |
| 29 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:os.name=Linux |
| 30 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:os.arch=amd64 |
| 31 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:os.version=5.10.47-linuxkit |
| 32 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:user.name=? |
| 33 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:user.home=? |
| 34 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:user.dir=/opt |
| 35 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:os.memory.free=336MB |
| 36 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:os.memory.max=4096MB |
| 37 | +[INFO] 2021-08-17 14:40:54,836 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer logEnv - Server environment:os.memory.total=357MB |
| 38 | +[INFO] 2021-08-17 14:40:54,838 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer setMinSessionTimeout - minSessionTimeout set to 6000 |
| 39 | +[INFO] 2021-08-17 14:40:54,838 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer setMaxSessionTimeout - maxSessionTimeout set to 60000 |
| 40 | +[INFO] 2021-08-17 14:40:54,839 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.ZooKeeperServer <init> - Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 60000 datadir /mnt/data/txnlog/version-2 snapdir /mnt/data/data/version-2 |
| 41 | +[INFO] 2021-08-17 14:40:54,839 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.quorum.Learner followLeader - FOLLOWING - LEADER ELECTION TOOK - 13 MS |
| 42 | +[WARN] 2021-08-17 14:40:54,841 [QuorumPeer[myid=0](plain=0.0.0.0:2181)(secure=0.0.0.0:2182)] org.apache.zookeeper.server.quorum.Learner connectToLeader - Unexpected exception, tries=0, remaining init limit=30000, connecting to zookeeper-1.zookeeper.sandbox.svc.cluster.local/172.17.0.6:2888 |
| 43 | + |
| 44 | +[INFO] 2021-08-17 14:49:42,057 [nioEventLoopGroup-7-1] org.apache.zookeeper.server.auth.X509AuthenticationProvider handleAuthentication - Authenticated Id 'CN=kafka,L=Earth,ST=Pangea,C=Universe' for Scheme 'x509' |
| 45 | +``` |
| 46 | + |
| 47 | +5. Validate Kafka is working using: |
| 48 | +```shell |
| 49 | +kubectl logs -f -n sandbox kafka-0 |
| 50 | + |
| 51 | +[INFO] 2021-08-17 14:49:00,492 [LicenseBackgroundFetcher RUNNING] org.apache.kafka.common.utils.AppInfoParser <init> - Kafka version: 6.1.2-ce |
| 52 | +[INFO] 2021-08-17 14:49:00,493 [LicenseBackgroundFetcher RUNNING] org.apache.kafka.common.utils.AppInfoParser <init> - Kafka commitId: 4c988093cc81349d |
| 53 | +[INFO] 2021-08-17 14:49:00,493 [LicenseBackgroundFetcher RUNNING] org.apache.kafka.common.utils.AppInfoParser <init> - Kafka startTimeMs: 1629211740492 |
| 54 | +[INFO] 2021-08-17 14:49:00,493 [kafka-producer-network-thread | confluent-metrics-reporter] org.apache.kafka.clients.Metadata update - [Producer clientId=confluent-metrics-reporter] Cluster ID: xBPcfVfKSrCS15AmzC6BUQ |
| 55 | +``` |
0 commit comments