Skip to content

Instantly share code, notes, and snippets.

@jldeen
Created May 21, 2019 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jldeen/4dfa55a64f5d60b5ed532e898fd924bd to your computer and use it in GitHub Desktop.
Save jldeen/4dfa55a64f5d60b5ed532e898fd924bd to your computer and use it in GitHub Desktop.

Microsoft, Linux, Open Source, Cloud + DevOps Demo Commands

Image Pull Secrets

  • kubectl create secret docker-registry secret-name-here --docker-server=docker-server-here --docker-username=username --docker-password=password --namespace=namespace
  • values: image: repository: registry-address-here/repo-name-here tag: tag-here pullPolicy: IfNotPresent imagePullSecrets: name: secret-name-here
  • deployment.yaml template {{- if .Values.imagePullSecrets }} imagePullSecrets: - name: {{ .Values.imagePullSecrets.name }} {{- end }}

ingress

  • values: ingress: enabled: true hostname: node.k8s.az.jessicadeen.com annotations: kubernetes.io/ingress.class: nginx certmanager.k8s.io/cluster-issuer: letsencrypt-prod kubernetes.io/tls-acme: "true" tls: true

  • ingress.yaml template

    {{- if .Values.ingress.enabled -}} apiVersion: extensions/v1beta1 kind: Ingress metadata: {{- if .Values.ingress.annotations }} annotations: {{ toYaml .Values.ingress.annotations | indent 4 }} {{- end }} name: {{ template "fullname" . }} labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" spec: rules: - host: {{ .Values.ingress.hostname | quote }} http: paths: - path: / backend: serviceName: {{ template "fullname" . }} servicePort: {{ .Values.service.externalPort }} {{- if .Values.ingress.tls }} tls: - secretName: {{ .Values.ingress.hostname | quote }} hosts: - {{ .Values.ingress.hostname | quote }} {{- end -}} {{- end }}

Other links

Contact Information

Let's stay in touch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment