-
kubectl vsphere login --server 192.168.199.2 --tanzu-kubernetes-cluster-namespace application-a --vsphere-username [email protected] --insecure-skip-tls-verify
-
cd github/tkg2-poc/clusters/
-
kubectl apply -f ./gc-small-classy.yaml
-
kubectl vsphere login --server 192.168.199.2 --tanzu-kubernetes-cluster-namespace application-a --tanzu-kubernetes-cluster-name --vsphere-username [email protected] --insecure-skip-tls-verify
-
Configure workable PSP - # Reference - https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-with-tanzu-tkg/GUID-0AEC33DE-DCE2-4FBE-A33F-73C4EDCCAB88.html#GUID-0AEC33DE-DCE2-4FBE-A33F-73C4EDCCAB88 a. Create RB to run Privileged Workloads in default Namespace - 1. kubectl create rolebinding rolebinding-default-privileged-sa-ns_default --namespace=default --clusterrole=psp:vmware-system-privileged --group=system:serviceaccounts
b. Create CRB to run Privileged in ANY namespace - 1. kubectl create clusterrolebinding psp:authenticated --clusterrole=psp:vmware-system-restricted --group=system:authenticated
-
cd ../apps/guestbook-sc-lb
-
kubectl apply -f guestbook-all-in-one.yaml
-
watch kubectl get pods -o wide
-
kubectl get sc
-
kubectl get pvc
-
kubectl get pv
-
kubectl describe sc thin-disk1
-
In vCenter goto Datastore and see the two dynamically provisioned VMDK's.
- nfs-ubuntu-01 —> kubevols —> Refresh
-
watch kubectl get pods -o wide
-
kubectl get services 1. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE 2. frontend LoadBalancer 10.100.200.46 10.40.14.39 80:32324/TCP 3m
-
Chrome - Access and test the Application - using Chrome 1. Chrome http://10.40.13.39
2. Enter some text into the application which will be stored in the REDIS DB on Persistent Volumes. 3. Show the Load Balancer that was created and the Virtual Servers etc. -
kubectl get po -o wide
- redis-master-89d7df6bf-6wrlb 1/1 Running 0 3m
- redis-slave-7cf6774dbb-srdxg 1/1 Running 0 3m
-
kubectl delete po redis-master-89d7df6bf-6wrlb redis-slave-7cf6774dbb-srdxg
-
watch kubectl get po -o wide
- Pods are recreated by the DEPLOYMENT automatically and should reconnect to the same Persistent Volumes
-
Chrome - TEST !!! - Access the Application again - It should have the same text you entered.
- If Local registry has a self signed CERT you will get an x509 Error pulling images.
- You will need to deploy or edit a cluster to include the regsitry trust section
- openssl s_client -connect 10.173.13.84:443
- CONNECTED(00000003)
- depth=0 C = CN, ST = NewYork, L = NewYork, O = example, OU = Personal, CN = harbor.tpmlab.vmware.com
- Server certificate
- -----BEGIN CERTIFICATE-----
- MIIGFTCCA/2gAwIBAgIUAIFOAaVcYubzVcqJ42FFAMUQ5r4wDQYJKoZIhvcNAQEN
- BQAweTELMAkGA1UEBhMCQ04xEDAOBgNVBAgMB05ld1lvcmsxEDAOBgNVBAcMB05l
- Base64 encode
- echo "-----BEGIN CERTIFICATE-----MIIGFTCCA/2gAwIBAgIUAIFOAaVcYubzVcqJ42FFAMUQ5r4wDQYJKoZIhvcNAQE.... | base64 -w 0
- Copy the output and Base64 encode again
- echo "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tDQpNSUlHRlRDQ0EvM...01TRXd | base64 -w 0
- Copy the output into the data section of the secret.
- vi aci-registryca-v2.yaml