From 6e4680a52273a79f38a757fba2e4ab5406a829e1 Mon Sep 17 00:00:00 2001 From: Mark Dechiaro Date: Fri, 26 Jan 2024 10:24:05 -0600 Subject: [PATCH] Fix puppetdb service name to match defaults Fix docs with latest info. --- README | 27 ++++++++++++++++++++++++--- puppet/puppetdb.yaml | 2 +- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/README b/README index ea21cde..ac425fd 100644 --- a/README +++ b/README @@ -16,7 +16,7 @@ This is not for production use. ## Current Stack ``` -# kubectl get pods -A +# kubectl get pods -A | grep -v kube-system NAMESPACE NAME READY STATUS RESTARTS AGE default dnsutils 1/1 Running 0 73m default psql-dcc7bbc66-5jl6w 1/1 Running 0 73m @@ -49,9 +49,30 @@ minikube config set memory 8192 kubectl apply -f puppet/ ``` -Use `minikube tunnel` in second terminal to test services with telnet +Use `minikube tunnel` in second terminal to test services with puppet outside of minikube. Use `kubectl get services` to get those external -IPs. If external IPs are ``, then tunnel isn't setup yet. +IPs. If external IPs are ``, then the tunnel isn't setup yet. + +``` +# kubectl get services -A -o wide +NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR +default kubernetes ClusterIP 10.96.0.1 443/TCP 22h +default postgres ClusterIP 10.111.26.163 5432/TCP 22h app.kubernetes.io/name=psql +default puppet LoadBalancer 10.100.87.56 10.100.87.56 8140:31525/TCP 22h app.kubernetes.io/name=puppetserver +default puppetca LoadBalancer 10.111.47.194 10.111.47.194 8140:30443/TCP 22h app.kubernetes.io/name=puppetca +default puppetdb ClusterIP 10.99.145.34 8081/TCP 22h app.kubernetes.io/name=puppetdb +kube-system kube-dns ClusterIP 10.96.0.10 53/UDP,53/TCP,9153/TCP 11d k8s-app=kube-dns +``` + +Add `EXTERNAL-IP` for puppet, puppetca services to `/etc/hosts` on the +external agent you want to register to this stack. IPs can change, so +check output of `kubectl get services -A -o wide` to get correct IPs. + +``` +# /etc/hosts +10.100.87.56 puppet.default.svc.cluster.local +10.111.47.194 puppetca.default.svc.cluster.local +``` You can verify dns is working with: diff --git a/puppet/puppetdb.yaml b/puppet/puppetdb.yaml index 19bdf1d..84dd8a5 100644 --- a/puppet/puppetdb.yaml +++ b/puppet/puppetdb.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Service metadata: - name: puppetdb-http + name: puppetdb spec: selector: app.kubernetes.io/name: puppetdb