The OpenFaaS documentation for faas-netes gives a clear explanation of how to install with Helm, but Pivotal Container Service (PKS) has 2 caveats since provisoned Kubernetes clusters are non-RBAC but are token backed and LoadBalancer inclusion with NSX-T
fba60ed2e6f39889220efe225a9e83c9-master.zip
PKS (AKA " Enterprise PKS ", " Pivotal Container Service ", "VMware PKS") is a solution designed to allow for the rapid and easy instantiation of Kubernetes clusters on a variety of different clouds, including on-premises via VMware vSphere
pks-dns-master.zip
http://www.sovsystems.com/optimize-vmwarepks-a-powershell-script-for-all-your-vmware-pks-deployment-needs/ http://www.lucd.info/2019/04/03/optimize-vmwarepks/ #PivotalContainerService(PKS) #pks #VMwarePivotalContainerService(PKS) #vSphere #MIT #powercli #PowerShell ...
Optimize-VMwarePKS.ps1
VMware Tanzu Kubernetes Grid Integrated or TKGI is a Kubernetes-based container solution with advanced networking, a private container registry, and life cycle management. TKGI simplifies the deployment and operation of Kubernetes clusters so you can run and manage containers at scale on private and public clouds
tkgi-monitoring-master.zip
Harbor is an Open Source Project that is sponsored by VMware and is currently being sandboxed by the CNCF. It's a container registry that has all the bells and whistles that include Clair for CVE (critical vulnerability) scanning and Notary for image signing
install.sh
In this document, we take a simple application that has several components or services. These services are required to communicate with each other in a very defined manner. For example, service-a needs to communicate with service-c and service-b but not with any other service. Similarly, service-c needs to communicate with service-d but not with service-a or service-b
nsxtk8smicrosegmentation-master.zip
This is an example python script that authenticates with the PKS API, then iterates through the deployed clusters to delete any not in the "do not delete" array. You need to create a UAA client for the API calls using the UAA CLI: uaac client add api-user -s 'Super$ecretP@ssword!' ...
snippet.py
This code has been tested on the following environment: PKS 1.2.0 NSX-T 2.3 Step1: Define a default storage class file storage-class.yaml: kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: standard-sc annotations: storageclass.kubernetes.io/is-default-class: "true" provisioner: kubernetes.io/vsphere-volume parameters: diskformat: thin apply the manifest file: kubectl apply -f storage-class.yaml Step2: Initiate Persistent Volume Claims for MySQL and WordPress file pvc-mysql.yaml: kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mysql-volumeclaim spec: accessModes: - ReadWriteOnce resources: requests: storage: 20Gi Apply the manifest file: kubectl apply -f pvc-mysql.yaml file pvc-wordpress.yaml: kind: PersistentVolumeClaim apiVersion: v1 metadata: name: wordpress-volumeclaim spec: accessModes: - ReadWriteOnce resources: requests: storage: 20Gi Apply the manifest file: kubectl apply -f pvc-wordpress.yaml Step3: Set password for MySQL kubectl create secret generic mysql --from-literal=password=vmware Step4: Deploy MySQL file mysql.yaml: apiVersion: apps/v1 kind: Deployment metadata: name: mysql labels: app: mysql spec: replicas: 1 selector: matchLabels: app: mysql template: metadata: labels: app: mysql spec: containers: - image: mysql:5.6 name: mysql env: - name: MYSQL ROOT PASSWORD valueFrom: secretKeyRef: name: mysql key: password ports: - containerPort: 3306 name: mysql volumeMounts: - name: mysql-persistent-storage mountPath: /var/lib/mysql volumes: - name: mysql-persistent-storage persistentVolumeClaim: claimName: mysql-volumeclaim Apply the manifest file: kubectl apply -f mysql.yaml Step5: Deploy K8s Service for MySQL file svc-mysql.yaml: apiVersion: v1 kind: Service metadata: name: mysql labels: app: mysql spec: type: ClusterIP ports: - port: 3306 selector: app: mysql Apply the manifest file: kubectl apply -f svc-mysql.yaml Step6: Deploy WordPress file wordpress.yaml: apiVersion: apps/v1 kind: Deployment metadata: name: wordpress labels: app: wordpress spec: replicas: 1 selector: matchLabels: app: wordpress template: metadata: labels: app: wordpress spec: containers: - image: wordpress name: wordpress env: - name: WORDPRESS DB HOST value: mysql:3306 - name: WORDPRESS DB PASSWORD valueFrom: secretKeyRef: name: mysql key: password ports: - containerPort: 80 name: wordpress volumeMounts: - name: wordpress-persistent-storage mountPath: /var/www/html volumes: - name: wordpress-persistent-storage persistentVolumeClaim: claimName: wordpress-volumeclaim Apply the manifest file: kubectl apply -f wordpress.yaml Step7: Deploy K8s service for WordPress file svc-wordpress.yaml: apiVersion: v1 kind: Service metadata: labels: app: wordpress name: wordpress spec: type: LoadBalancer ports: - port: 80 targetPort: 80 protocol: TCP selector: app: wordpress Apply the manifest file: kubectl apply -f svc-wordpress.yaml Access WordPress application Retrieve the IP address of the LB: # kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.100.200.1 <none> 443/TCP 22h mysql ClusterIP 10.100.200.47 <none> 3306/TCP 2m wordpress LoadBalancer 10.100.200.178 10.40.14.86 ,100.64.112.69 80:30216/TCP 2m Open a web browser and use the following URL: http://10.40.14.86 You will see this page: Click on Continue Fill the requested fields
snippet.txt
View the README for all information on how to insrtall Istio on PKS Installing Istio in New Kubernetes Clusters Created by PKS with NSX-T Using Helm This topic describes how to install Istio in a new Kubernetes cluster created by Pivotal Container Service (PKS) with NSX-T using Helm
bookinfo01.png
PKS Autoscaler PKS Autoscaler NOT FOR PRODUCTION USE This project implements a workflow, within the OpsManager enviornment, to autoscale K8s clusters that have been deployed using Pivotal COntainer Services (PKS)
pks-autoscaler-master.zip